mirror of
https://github.com/primer/css.git
synced 2025-01-03 03:34:16 +03:00
Docs for responsive positioning
This commit is contained in:
parent
1c9fbfa178
commit
93170a2db5
21
modules/primer-marketing-utilities/docs/layout.md
Normal file
21
modules/primer-marketing-utilities/docs/layout.md
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
title: Layout
|
||||
status: New release
|
||||
status_issue: https://github.com/github/design-systems/issues/325
|
||||
---
|
||||
|
||||
The following layout utilities are meant to used in addition to those within primer-core.
|
||||
|
||||
{:toc}
|
||||
|
||||
## Responsive position
|
||||
|
||||
These position utilities behave the same way as the positioning utilities in primer-core, however they include responsive states so that they can be used at specific viewport widths.
|
||||
|
||||
```html
|
||||
<div class="position-relative p-6">
|
||||
<div class="position-md-absolute bottom-0 right-0 border p-2">
|
||||
<a href="#url" class="d-block p-1">Mashed potatoes</a>
|
||||
</div>
|
||||
</div>
|
||||
```
|
@ -9,5 +9,7 @@
|
||||
.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; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user