-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-10.0.0' into code_padding
- Loading branch information
Showing
18 changed files
with
199 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,10 @@ | |
margin-bottom: 0; | ||
} | ||
|
||
li { | ||
word-wrap: break-all; | ||
} | ||
|
||
li > p { | ||
margin-top: $spacer-3; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: Layout | ||
status: New release | ||
--- | ||
|
||
Marketing layout utilities build on top of [primer-core utilities](/layout/#position), adding the option of responsive positioning. | ||
|
||
{:toc} | ||
|
||
## Responsive position | ||
|
||
Use responsive position utilities to adjust the position of an element at different breakpoints. | ||
|
||
```html | ||
<div class="position-relative p-6 bg-gray"> | ||
<div class="d-inline-block position-md-absolute bottom-0 right-0 border bg-white p-2"> | ||
.position-md-absolute | ||
</div> | ||
</div> | ||
|
||
<div class="float-left border m-3" style="width:100px; height:100px;"> | ||
default | ||
</div> | ||
<div class="float-left position-lg-relative border m-3" style="width:100px; height:100px; top:12px; left:12px;"> | ||
.position-lg-relative | ||
</div> | ||
<div class="float-left border m-3" style="width:100px; height:100px;"> | ||
default | ||
</div> | ||
<div class="float-left border m-3" style="width:100px; height:100px;"> | ||
default | ||
</div> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
// utilities | ||
@import "./lib/filters.scss"; | ||
@import "./lib/borders.scss"; | ||
@import "./lib/layout.scss"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Layout utilities | ||
// stylelint-disable block-opening-brace-space-before, primer/selector-no-utility, comment-empty-line-before | ||
|
||
// Responsive position utilities | ||
|
||
@each $breakpoint in map-keys($breakpoints) { | ||
@include breakpoint($breakpoint) { | ||
/* Set position to relative */ | ||
.position-#{$breakpoint}-relative { position: relative !important; } | ||
/* Set position to absolute */ | ||
.position-#{$breakpoint}-absolute { position: absolute !important; } | ||
/* Set position to fixed */ | ||
.position-#{$breakpoint}-fixed { position: fixed !important; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react' | ||
import { storiesOf } from '@storybook/react' | ||
|
||
storiesOf('Marketing Utilities', module) | ||
.add('Responsive borders', () => ( | ||
<div className='border-top border-sm-right border-md-bottom border-lg-top-0'>.border-top-0</div> | ||
)) | ||
.add('border-white-fade', () => ( | ||
<div className='bg-blue text-white p-3'> | ||
<span className='border border-white-fade p-2'> | ||
.border-white-fade | ||
</span> | ||
</div> | ||
)) | ||
.add('Responsive position', () => ( | ||
<div className='position-relative p-6 bg-gray'> | ||
<div className='d-inline-block position-md-absolute bottom-0 right-0 border bg-white p-2'> | ||
.position-md-absolute | ||
</div> | ||
</div> | ||
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.