Skip to content

CSS: responsive

[class*="-hidden-"],[class*="-show-"] — Classes d'affichage/masquage selon la largeur du viewport ou du conteneur sur une échelle de points d'arrêt thématisée.

.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

Utilisation

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

Exemples

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>

Modificateurs

ModificateurDescription
.-cq-hidden-max-contentMasquer lorsque le conteneur marqué est au point d'arrêt content ou en dessous (68.75em).
.-cq-hidden-max-content-full-widthMasquer lorsque le conteneur marqué est au point d'arrêt content-full-width ou en dessous (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-lgMasquer lorsque le conteneur marqué est au point d'arrêt lg ou en dessous (48em).
.-cq-hidden-max-mdMasquer lorsque le conteneur marqué est au point d'arrêt md ou en dessous (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-smMasquer lorsque le conteneur marqué est au point d'arrêt sm ou en dessous (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-xlMasquer lorsque le conteneur marqué est au point d'arrêt xl ou en dessous (62em).
.-cq-hidden-max-xsMasquer lorsque le conteneur marqué est au point d'arrêt xs ou en dessous (16em).
.-cq-hidden-min-contentMasquer lorsque le conteneur marqué est au point d'arrêt content ou au-dessus (68.75em).
.-cq-hidden-min-content-full-widthMasquer lorsque le conteneur marqué est au point d'arrêt content-full-width ou au-dessus (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-lgMasquer lorsque le conteneur marqué est au point d'arrêt lg ou au-dessus (48em).
.-cq-hidden-min-mdMasquer lorsque le conteneur marqué est au point d'arrêt md ou au-dessus (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-smMasquer lorsque le conteneur marqué est au point d'arrêt sm ou au-dessus (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-xlMasquer lorsque le conteneur marqué est au point d'arrêt xl ou au-dessus (62em).
.-cq-hidden-min-xsMasquer lorsque le conteneur marqué est au point d'arrêt xs ou au-dessus (16em).
.-cq-show-max-contentAfficher lorsque le conteneur marqué est au point d'arrêt content ou en dessous (68.75em) ; caché sinon.
.-cq-show-max-content-full-widthAfficher lorsque le conteneur marqué est au point d'arrêt content-full-width ou en dessous (98.75em) ; caché sinon.
.-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-lgAfficher lorsque le conteneur marqué est au point d'arrêt lg ou en dessous (48em) ; caché sinon.
.-cq-show-max-mdAfficher lorsque le conteneur marqué est au point d'arrêt md ou en dessous (30em) ; caché sinon.
.-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-smAfficher lorsque le conteneur marqué est au point d'arrêt sm ou en dessous (20em) ; caché sinon.
.-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-xlAfficher lorsque le conteneur marqué est au point d'arrêt xl ou en dessous (62em) ; caché sinon.
.-cq-show-max-xsAfficher lorsque le conteneur marqué est au point d'arrêt xs ou en dessous (16em) ; caché sinon.
.-cq-show-min-contentAfficher lorsque le conteneur marqué est au point d'arrêt content ou au-dessus (68.75em) ; caché sinon.
.-cq-show-min-content-full-widthAfficher lorsque le conteneur marqué est au point d'arrêt content-full-width ou au-dessus (98.75em) ; caché sinon.
.-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-lgAfficher lorsque le conteneur marqué est au point d'arrêt lg ou au-dessus (48em) ; caché sinon.
.-cq-show-min-mdAfficher lorsque le conteneur marqué est au point d'arrêt md ou au-dessus (30em) ; caché sinon.
.-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-smAfficher lorsque le conteneur marqué est au point d'arrêt sm ou au-dessus (20em) ; caché sinon.
.-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-xlAfficher lorsque le conteneur marqué est au point d'arrêt xl ou au-dessus (62em) ; caché sinon.
.-cq-show-min-xsAfficher lorsque le conteneur marqué est au point d'arrêt xs ou au-dessus (16em) ; caché sinon.
.-hidden-max-contentMasquer lorsque le viewport est au point d'arrêt content ou en dessous (68.75em).
.-hidden-max-content-full-widthMasquer lorsque le viewport est au point d'arrêt content-full-width ou en dessous (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-lgMasquer lorsque le viewport est au point d'arrêt lg ou en dessous (48em).
.-hidden-max-mdMasquer lorsque le viewport est au point d'arrêt md ou en dessous (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-smMasquer lorsque le viewport est au point d'arrêt sm ou en dessous (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-xlMasquer lorsque le viewport est au point d'arrêt xl ou en dessous (62em).
.-hidden-max-xsMasquer lorsque le viewport est au point d'arrêt xs ou en dessous (16em).
.-hidden-min-contentMasquer lorsque le viewport est au point d'arrêt content ou au-dessus (68.75em).
.-hidden-min-content-full-widthMasquer lorsque le viewport est au point d'arrêt content-full-width ou au-dessus (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-lgMasquer lorsque le viewport est au point d'arrêt lg ou au-dessus (48em).
.-hidden-min-mdMasquer lorsque le viewport est au point d'arrêt md ou au-dessus (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-smMasquer lorsque le viewport est au point d'arrêt sm ou au-dessus (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-xlMasquer lorsque le viewport est au point d'arrêt xl ou au-dessus (62em).
.-hidden-min-xsMasquer lorsque le viewport est au point d'arrêt xs ou au-dessus (16em).
.-show-max-contentAfficher (inverse de -hidden-min-content) lorsque le viewport est au point d'arrêt content ou en dessous (68.75em) ; caché sinon.
.-show-max-content-full-widthAfficher (inverse de -hidden-min-content-full-width) lorsque le viewport est au point d'arrêt content-full-width ou en dessous (98.75em) ; caché sinon.
.-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-lgAfficher (inverse de -hidden-min-lg) lorsque la fenêtre d'affichage est à ou en dessous du point d'arrêt lg (48em) ; masqué sinon.
.-show-max-mdAfficher (inverse de -hidden-min-md) lorsque la fenêtre d'affichage est à ou en dessous du point d'arrêt md (30em) ; masqué sinon.
.-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-smAfficher (inverse de -hidden-min-sm) lorsque la fenêtre d'affichage est à ou en dessous du point d'arrêt sm (20em) ; masqué sinon.
.-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-xlAfficher (inverse de -hidden-min-xl) lorsque la fenêtre d'affichage est à ou en dessous du point d'arrêt xl (62em) ; masqué sinon.
.-show-max-xsAfficher (inverse de -hidden-min-xs) lorsque la fenêtre d'affichage est à ou en dessous du point d'arrêt xs (16em) ; masqué sinon.
.-show-min-contentAfficher (inverse de -hidden-max-content) lorsque la fenêtre d'affichage est à ou au-dessus du point d'arrêt content (68.75em) ; masqué sinon.
.-show-min-content-full-widthAfficher (inverse de -hidden-max-content-full-width) lorsque la fenêtre d'affichage est à ou au-dessus du point d'arrêt content-full-width (98.75em) ; masqué sinon.
.-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-lgAfficher (inverse de -hidden-max-lg) lorsque la fenêtre d'affichage est à ou au-dessus du point d'arrêt lg (48em) ; masqué sinon.
.-show-min-mdAfficher (inverse de -hidden-max-md) lorsque la fenêtre d'affichage est à ou au-dessus du point d'arrêt md (30em) ; masqué sinon.
.-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-smAfficher (inverse de -hidden-max-sm) lorsque la fenêtre d'affichage est à ou au-dessus du point d'arrêt sm (20em) ; masqué sinon.
.-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-xlAfficher (inverse de -hidden-max-xl) lorsque la fenêtre d'affichage est à ou au-dessus du point d'arrêt xl (62em) ; masqué sinon.
.-show-min-xsAfficher (inverse de -hidden-max-xs) lorsque la fenêtre d'affichage est à ou au-dessus du point d'arrêt xs (16em) ; masqué sinon.

Propriétés personnalisées

PropriétéTypeDéfautDescription
--pantoken-bp-content<length>68.75emLa valeur du point d'arrêt content (68.75em, saisie manuellement, thématisée (non incluse dans l'IR des tokens)). La remplacer ne déplace pas vers le haut les seuils compilés @media/@container.
--pantoken-bp-content-full-width<length>98.75emLa valeur du point d'arrêt content-full-width (98.75em, saisie manuellement, thématisée (non incluse dans l'IR des tokens)). La remplacer ne déplace pas vers le haut les seuils compilés @media/@container.
--pantoken-bp-lg<length>48emLa valeur du point d'arrêt lg (48em, reflète --instui-component-tray-width-lg). La remplacer ne déplace pas vers le haut les seuils compilés @media/@container.
--pantoken-bp-md<length>30emLa valeur du point d'arrêt md (30em, reflète --instui-component-tray-width-md). La remplacer ne déplace pas vers le haut les seuils compilés @media/@container.
--pantoken-bp-sm<length>20emLa valeur du point d'arrêt sm (20em, reflète --instui-component-tray-width-sm). La remplacer ne déplace pas vers le haut les seuils compilés @media/@container.
--pantoken-bp-xl<length>62emLa valeur du point d'arrêt xl (62em, reflète --instui-component-tray-width-xl). La remplacer ne déplace pas vers le haut les seuils compilés @media/@container.
--pantoken-bp-xs<length>16emLa valeur du point d'arrêt xs (16em, reflète --instui-component-tray-width-xs). La remplacer ne déplace pas vers le haut les seuils compilés @media/@container.

Conditions

TypeRequêteDescription
media(max-width: 16em)Limite supérieure du point d'arrêt xs.
media(min-width: 16em)Limite inférieure du point d'arrêt xs.
media(max-width: 20em)Limite supérieure du point d'arrêt sm.
media(min-width: 20em)Limite inférieure du point d'arrêt sm.
media(max-width: 30em)Limite supérieure du point d'arrêt md.
media(min-width: 30em)Limite inférieure du point d'arrêt md.
media(max-width: 48em)Limite supérieure du point d'arrêt lg.
media(min-width: 48em)Limite inférieure du point d'arrêt lg.
media(max-width: 62em)Limite supérieure du point d'arrêt xl.
media(min-width: 62em)Limite inférieure du point d'arrêt xl.
media(max-width: 68.75em)Limite supérieure du point d'arrêt content.
media(min-width: 68.75em)Limite inférieure du point d'arrêt content.
media(max-width: 98.75em)Limite supérieure du point d'arrêt content-full-width.
media(min-width: 98.75em)Limite inférieure du point d'arrêt content-full-width.
container(max-width: 16em)Limite supérieure du point d'arrêt xs, évaluée par rapport à un conteneur marqué.
container(min-width: 16em)Limite inférieure du point d'arrêt xs, évaluée par rapport à un conteneur marqué.
container(max-width: 20em)Limite supérieure du point d'arrêt sm, évaluée par rapport à un conteneur marqué.
container(min-width: 20em)Limite inférieure du point d'arrêt sm, évaluée par rapport à un conteneur marqué.
container(max-width: 30em)Limite supérieure du point d'arrêt md, évaluée par rapport à un conteneur marqué.
container(min-width: 30em)Limite inférieure du point d'arrêt md, évaluée par rapport à un conteneur marqué.
container(max-width: 48em)Limite supérieure du point d'arrêt lg, évaluée par rapport à un conteneur marqué.
container(min-width: 48em)Limite inférieure du point d'arrêt lg, évaluée par rapport à un conteneur marqué.
container(max-width: 62em)Limite supérieure du point d'arrêt xl, évaluée par rapport à un conteneur marqué.
container(min-width: 62em)Limite inférieure du point d'arrêt xl, évaluée par rapport à un conteneur marqué.
container(max-width: 68.75em)Limite supérieure du point d'arrêt content, évaluée par rapport à un conteneur marqué.
container(min-width: 68.75em)Borne inférieure du point d'arrêt content, évaluée par rapport à un conteneur marqué.
container(max-width: 98.75em)Borne supérieure du point d'arrêt content-full-width, évaluée par rapport à un conteneur marqué.
container(min-width: 98.75em)Borne inférieure du point d'arrêt content-full-width, évaluée par rapport à un conteneur marqué.

Jetons consommés

TokenTypeValeur
--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