mirror of
https://github.com/primer/css.git
synced 2024-11-09 22:56:26 +03:00
Add narrow/regular/wide viewport range utilities (#1995)
* Add viewport range utilities * Add comment about wide viewport range size * Stylelint auto-fixes * Create proud-donkeys-happen.md * Add support for `.show-whenRegular.hide-whenWide` As per discussion in https://github.com/primer/css/pull/1995/files#r834365336 Co-authored-by: Actions Auto Build <actions@github.com> Co-authored-by: Katie Langerman <langermank@github.com>
This commit is contained in:
parent
09f9d84c4d
commit
557b100a77
5
.changeset/proud-donkeys-happen.md
Normal file
5
.changeset/proud-donkeys-happen.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@primer/css": patch
|
||||
---
|
||||
|
||||
Add narrow/regular/wide viewport range utilities
|
@ -38,6 +38,55 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Show/Hide Viewport range utilities
|
||||
|
||||
.show-whenNarrow,
|
||||
.show-whenRegular,
|
||||
.show-whenWide,
|
||||
.show-whenRegular.hide-whenWide {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.hide-whenNarrow,
|
||||
.hide-whenRegular,
|
||||
.hide-whenWide {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
@media (max-width: $width-md - 0.02px) {
|
||||
.show-whenNarrow {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.hide-whenNarrow {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: $width-md) {
|
||||
.show-whenRegular,
|
||||
.show-whenRegular.hide-whenWide {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.hide-whenRegular {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
// The width of a `wide` viewport range may change as we're finalizing
|
||||
// the Primer primitives viewport ranges proposal
|
||||
@media (min-width: $width-xl) {
|
||||
.show-whenWide {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.hide-whenWide,
|
||||
.show-whenRegular.hide-whenWide {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Set the table-layout to fixed */
|
||||
.table-fixed { table-layout: fixed !important; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user