Skip to content

CSS: responsive

[class*="-hidden-"],[class*="-show-"] — Viewport- or container-width show/hide classes across a themed breakpoint scale.

.instui-hidden-max-<bp>/-hidden-min-<bp> hide by viewport width; .instui-show-max-<bp>/-show-min-<bp> are the inverse (hidden by default, shown only inside the range via display: revert); the -cq- variants react to a .instui-container ancestor's width instead, not the viewport's. Scale tiers xs/sm/md/lg/xl (sourced from the IR's tray-width component tokens) are each aliased to a long-form spelling (x-smallx-large) and a device name (mobile/phablet/tablet/laptop/desktop) — both deprecated in favor of the short name — plus the unscaled, themed content/content-full-width tiers (the main content area's max-width).

Source: index.ts

Usage

css
@import "@pantoken/components/utilities.css";

Examples

html
<div class="instui-hidden-max-sm">Hidden at or below the small breakpoint.</div>
<div class="instui-show-min-sm">Shown only at or above the small breakpoint.</div>

Modifiers

ModifierDescription
.-cq-hidden-max-contentHide when the marked container is at or below the content breakpoint (68.75em).
.-cq-hidden-max-content-full-widthHide when the marked container is at or below the content-full-width breakpoint (98.75em).
.-cq-hidden-max-desktopAlias — maps to .-cq-hidden-max-xl.
.-cq-hidden-max-laptopAlias — maps to .-cq-hidden-max-lg.
.-cq-hidden-max-largeAlias — maps to .-cq-hidden-max-lg.
.-cq-hidden-max-lgHide when the marked container is at or below the lg breakpoint (48em).
.-cq-hidden-max-mdHide when the marked container is at or below the md breakpoint (30em).
.-cq-hidden-max-mediumAlias — maps to .-cq-hidden-max-md.
.-cq-hidden-max-mobileAlias — maps to .-cq-hidden-max-xs.
.-cq-hidden-max-phabletAlias — maps to .-cq-hidden-max-sm.
.-cq-hidden-max-smHide when the marked container is at or below the sm breakpoint (20em).
.-cq-hidden-max-smallAlias — maps to .-cq-hidden-max-sm.
.-cq-hidden-max-tabletAlias — maps to .-cq-hidden-max-md.
.-cq-hidden-max-x-largeAlias — maps to .-cq-hidden-max-xl.
.-cq-hidden-max-x-smallAlias — maps to .-cq-hidden-max-xs.
.-cq-hidden-max-xlHide when the marked container is at or below the xl breakpoint (62em).
.-cq-hidden-max-xsHide when the marked container is at or below the xs breakpoint (16em).
.-cq-hidden-min-contentHide when the marked container is at or above the content breakpoint (68.75em).
.-cq-hidden-min-content-full-widthHide when the marked container is at or above the content-full-width breakpoint (98.75em).
.-cq-hidden-min-desktopAlias — maps to .-cq-hidden-min-xl.
.-cq-hidden-min-laptopAlias — maps to .-cq-hidden-min-lg.
.-cq-hidden-min-largeAlias — maps to .-cq-hidden-min-lg.
.-cq-hidden-min-lgHide when the marked container is at or above the lg breakpoint (48em).
.-cq-hidden-min-mdHide when the marked container is at or above the md breakpoint (30em).
.-cq-hidden-min-mediumAlias — maps to .-cq-hidden-min-md.
.-cq-hidden-min-mobileAlias — maps to .-cq-hidden-min-xs.
.-cq-hidden-min-phabletAlias — maps to .-cq-hidden-min-sm.
.-cq-hidden-min-smHide when the marked container is at or above the sm breakpoint (20em).
.-cq-hidden-min-smallAlias — maps to .-cq-hidden-min-sm.
.-cq-hidden-min-tabletAlias — maps to .-cq-hidden-min-md.
.-cq-hidden-min-x-largeAlias — maps to .-cq-hidden-min-xl.
.-cq-hidden-min-x-smallAlias — maps to .-cq-hidden-min-xs.
.-cq-hidden-min-xlHide when the marked container is at or above the xl breakpoint (62em).
.-cq-hidden-min-xsHide when the marked container is at or above the xs breakpoint (16em).
.-cq-show-max-contentShow when the marked container is at or below the content breakpoint (68.75em); hidden otherwise.
.-cq-show-max-content-full-widthShow when the marked container is at or below the content-full-width breakpoint (98.75em); hidden otherwise.
.-cq-show-max-desktopAlias — maps to .-cq-show-max-xl.
.-cq-show-max-laptopAlias — maps to .-cq-show-max-lg.
.-cq-show-max-largeAlias — maps to .-cq-show-max-lg.
.-cq-show-max-lgShow when the marked container is at or below the lg breakpoint (48em); hidden otherwise.
.-cq-show-max-mdShow when the marked container is at or below the md breakpoint (30em); hidden otherwise.
.-cq-show-max-mediumAlias — maps to .-cq-show-max-md.
.-cq-show-max-mobileAlias — maps to .-cq-show-max-xs.
.-cq-show-max-phabletAlias — maps to .-cq-show-max-sm.
.-cq-show-max-smShow when the marked container is at or below the sm breakpoint (20em); hidden otherwise.
.-cq-show-max-smallAlias — maps to .-cq-show-max-sm.
.-cq-show-max-tabletAlias — maps to .-cq-show-max-md.
.-cq-show-max-x-largeAlias — maps to .-cq-show-max-xl.
.-cq-show-max-x-smallAlias — maps to .-cq-show-max-xs.
.-cq-show-max-xlShow when the marked container is at or below the xl breakpoint (62em); hidden otherwise.
.-cq-show-max-xsShow when the marked container is at or below the xs breakpoint (16em); hidden otherwise.
.-cq-show-min-contentShow when the marked container is at or above the content breakpoint (68.75em); hidden otherwise.
.-cq-show-min-content-full-widthShow when the marked container is at or above the content-full-width breakpoint (98.75em); hidden otherwise.
.-cq-show-min-desktopAlias — maps to .-cq-show-min-xl.
.-cq-show-min-laptopAlias — maps to .-cq-show-min-lg.
.-cq-show-min-largeAlias — maps to .-cq-show-min-lg.
.-cq-show-min-lgShow when the marked container is at or above the lg breakpoint (48em); hidden otherwise.
.-cq-show-min-mdShow when the marked container is at or above the md breakpoint (30em); hidden otherwise.
.-cq-show-min-mediumAlias — maps to .-cq-show-min-md.
.-cq-show-min-mobileAlias — maps to .-cq-show-min-xs.
.-cq-show-min-phabletAlias — maps to .-cq-show-min-sm.
.-cq-show-min-smShow when the marked container is at or above the sm breakpoint (20em); hidden otherwise.
.-cq-show-min-smallAlias — maps to .-cq-show-min-sm.
.-cq-show-min-tabletAlias — maps to .-cq-show-min-md.
.-cq-show-min-x-largeAlias — maps to .-cq-show-min-xl.
.-cq-show-min-x-smallAlias — maps to .-cq-show-min-xs.
.-cq-show-min-xlShow when the marked container is at or above the xl breakpoint (62em); hidden otherwise.
.-cq-show-min-xsShow when the marked container is at or above the xs breakpoint (16em); hidden otherwise.
.-hidden-max-contentHide when the viewport is at or below the content breakpoint (68.75em).
.-hidden-max-content-full-widthHide when the viewport is at or below the content-full-width breakpoint (98.75em).
.-hidden-max-desktopAlias — maps to .-hidden-max-xl.
.-hidden-max-laptopAlias — maps to .-hidden-max-lg.
.-hidden-max-largeAlias — maps to .-hidden-max-lg.
.-hidden-max-lgHide when the viewport is at or below the lg breakpoint (48em).
.-hidden-max-mdHide when the viewport is at or below the md breakpoint (30em).
.-hidden-max-mediumAlias — maps to .-hidden-max-md.
.-hidden-max-mobileAlias — maps to .-hidden-max-xs.
.-hidden-max-phabletAlias — maps to .-hidden-max-sm.
.-hidden-max-smHide when the viewport is at or below the sm breakpoint (20em).
.-hidden-max-smallAlias — maps to .-hidden-max-sm.
.-hidden-max-tabletAlias — maps to .-hidden-max-md.
.-hidden-max-x-largeAlias — maps to .-hidden-max-xl.
.-hidden-max-x-smallAlias — maps to .-hidden-max-xs.
.-hidden-max-xlHide when the viewport is at or below the xl breakpoint (62em).
.-hidden-max-xsHide when the viewport is at or below the xs breakpoint (16em).
.-hidden-min-contentHide when the viewport is at or above the content breakpoint (68.75em).
.-hidden-min-content-full-widthHide when the viewport is at or above the content-full-width breakpoint (98.75em).
.-hidden-min-desktopAlias — maps to .-hidden-min-xl.
.-hidden-min-laptopAlias — maps to .-hidden-min-lg.
.-hidden-min-largeAlias — maps to .-hidden-min-lg.
.-hidden-min-lgHide when the viewport is at or above the lg breakpoint (48em).
.-hidden-min-mdHide when the viewport is at or above the md breakpoint (30em).
.-hidden-min-mediumAlias — maps to .-hidden-min-md.
.-hidden-min-mobileAlias — maps to .-hidden-min-xs.
.-hidden-min-phabletAlias — maps to .-hidden-min-sm.
.-hidden-min-smHide when the viewport is at or above the sm breakpoint (20em).
.-hidden-min-smallAlias — maps to .-hidden-min-sm.
.-hidden-min-tabletAlias — maps to .-hidden-min-md.
.-hidden-min-x-largeAlias — maps to .-hidden-min-xl.
.-hidden-min-x-smallAlias — maps to .-hidden-min-xs.
.-hidden-min-xlHide when the viewport is at or above the xl breakpoint (62em).
.-hidden-min-xsHide when the viewport is at or above the xs breakpoint (16em).
.-show-max-contentShow (inverse of -hidden-min-content) when the viewport is at or below the content breakpoint (68.75em); hidden otherwise.
.-show-max-content-full-widthShow (inverse of -hidden-min-content-full-width) when the viewport is at or below the content-full-width breakpoint (98.75em); hidden otherwise.
.-show-max-desktopAlias — maps to .-show-max-xl.
.-show-max-laptopAlias — maps to .-show-max-lg.
.-show-max-largeAlias — maps to .-show-max-lg.
.-show-max-lgShow (inverse of -hidden-min-lg) when the viewport is at or below the lg breakpoint (48em); hidden otherwise.
.-show-max-mdShow (inverse of -hidden-min-md) when the viewport is at or below the md breakpoint (30em); hidden otherwise.
.-show-max-mediumAlias — maps to .-show-max-md.
.-show-max-mobileAlias — maps to .-show-max-xs.
.-show-max-phabletAlias — maps to .-show-max-sm.
.-show-max-smShow (inverse of -hidden-min-sm) when the viewport is at or below the sm breakpoint (20em); hidden otherwise.
.-show-max-smallAlias — maps to .-show-max-sm.
.-show-max-tabletAlias — maps to .-show-max-md.
.-show-max-x-largeAlias — maps to .-show-max-xl.
.-show-max-x-smallAlias — maps to .-show-max-xs.
.-show-max-xlShow (inverse of -hidden-min-xl) when the viewport is at or below the xl breakpoint (62em); hidden otherwise.
.-show-max-xsShow (inverse of -hidden-min-xs) when the viewport is at or below the xs breakpoint (16em); hidden otherwise.
.-show-min-contentShow (inverse of -hidden-max-content) when the viewport is at or above the content breakpoint (68.75em); hidden otherwise.
.-show-min-content-full-widthShow (inverse of -hidden-max-content-full-width) when the viewport is at or above the content-full-width breakpoint (98.75em); hidden otherwise.
.-show-min-desktopAlias — maps to .-show-min-xl.
.-show-min-laptopAlias — maps to .-show-min-lg.
.-show-min-largeAlias — maps to .-show-min-lg.
.-show-min-lgShow (inverse of -hidden-max-lg) when the viewport is at or above the lg breakpoint (48em); hidden otherwise.
.-show-min-mdShow (inverse of -hidden-max-md) when the viewport is at or above the md breakpoint (30em); hidden otherwise.
.-show-min-mediumAlias — maps to .-show-min-md.
.-show-min-mobileAlias — maps to .-show-min-xs.
.-show-min-phabletAlias — maps to .-show-min-sm.
.-show-min-smShow (inverse of -hidden-max-sm) when the viewport is at or above the sm breakpoint (20em); hidden otherwise.
.-show-min-smallAlias — maps to .-show-min-sm.
.-show-min-tabletAlias — maps to .-show-min-md.
.-show-min-x-largeAlias — maps to .-show-min-xl.
.-show-min-x-smallAlias — maps to .-show-min-xs.
.-show-min-xlShow (inverse of -hidden-max-xl) when the viewport is at or above the xl breakpoint (62em); hidden otherwise.
.-show-min-xsShow (inverse of -hidden-max-xs) when the viewport is at or above the xs breakpoint (16em); hidden otherwise.

Custom properties

PropertyTypeDefaultDescription
--pantoken-bp-content<length>68.75emThe content breakpoint's value (68.75em, hand-authored, themed (not in the token IR)). Overriding it does not move the compiled @media/@container thresholds above.
--pantoken-bp-content-full-width<length>98.75emThe content-full-width breakpoint's value (98.75em, hand-authored, themed (not in the token IR)). Overriding it does not move the compiled @media/@container thresholds above.
--pantoken-bp-lg<length>48emThe lg breakpoint's value (48em, mirrors --instui-component-tray-width-lg). Overriding it does not move the compiled @media/@container thresholds above.
--pantoken-bp-md<length>30emThe md breakpoint's value (30em, mirrors --instui-component-tray-width-md). Overriding it does not move the compiled @media/@container thresholds above.
--pantoken-bp-sm<length>20emThe sm breakpoint's value (20em, mirrors --instui-component-tray-width-sm). Overriding it does not move the compiled @media/@container thresholds above.
--pantoken-bp-xl<length>62emThe xl breakpoint's value (62em, mirrors --instui-component-tray-width-xl). Overriding it does not move the compiled @media/@container thresholds above.
--pantoken-bp-xs<length>16emThe xs breakpoint's value (16em, mirrors --instui-component-tray-width-xs). Overriding it does not move the compiled @media/@container thresholds above.

Conditions

TypeQueryDescription
media(max-width: 16em)Upper bound of the xs breakpoint.
media(min-width: 16em)Lower bound of the xs breakpoint.
media(max-width: 20em)Upper bound of the sm breakpoint.
media(min-width: 20em)Lower bound of the sm breakpoint.
media(max-width: 30em)Upper bound of the md breakpoint.
media(min-width: 30em)Lower bound of the md breakpoint.
media(max-width: 48em)Upper bound of the lg breakpoint.
media(min-width: 48em)Lower bound of the lg breakpoint.
media(max-width: 62em)Upper bound of the xl breakpoint.
media(min-width: 62em)Lower bound of the xl breakpoint.
media(max-width: 68.75em)Upper bound of the content breakpoint.
media(min-width: 68.75em)Lower bound of the content breakpoint.
media(max-width: 98.75em)Upper bound of the content-full-width breakpoint.
media(min-width: 98.75em)Lower bound of the content-full-width breakpoint.
container(max-width: 16em)Upper bound of the xs breakpoint, evaluated against a marked container.
container(min-width: 16em)Lower bound of the xs breakpoint, evaluated against a marked container.
container(max-width: 20em)Upper bound of the sm breakpoint, evaluated against a marked container.
container(min-width: 20em)Lower bound of the sm breakpoint, evaluated against a marked container.
container(max-width: 30em)Upper bound of the md breakpoint, evaluated against a marked container.
container(min-width: 30em)Lower bound of the md breakpoint, evaluated against a marked container.
container(max-width: 48em)Upper bound of the lg breakpoint, evaluated against a marked container.
container(min-width: 48em)Lower bound of the lg breakpoint, evaluated against a marked container.
container(max-width: 62em)Upper bound of the xl breakpoint, evaluated against a marked container.
container(min-width: 62em)Lower bound of the xl breakpoint, evaluated against a marked container.
container(max-width: 68.75em)Upper bound of the content breakpoint, evaluated against a marked container.
container(min-width: 68.75em)Lower bound of the content breakpoint, evaluated against a marked container.
container(max-width: 98.75em)Upper bound of the content-full-width breakpoint, evaluated against a marked container.
container(min-width: 98.75em)Lower bound of the content-full-width breakpoint, evaluated against a marked container.

Tokens consumed

TokenTypeValue
--instui-component-tray-width-lg<length>48em
--instui-component-tray-width-md<length>30em
--instui-component-tray-width-sm<length>20em
--instui-component-tray-width-xl<length>62em
--instui-component-tray-width-xs<length>16em