1
1
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:
Sophie Shepherd 2017-10-19 12:05:17 -05:00
parent 1c9fbfa178
commit 93170a2db5
2 changed files with 23 additions and 0 deletions

View 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>
```

View File

@ -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; }
}
}