@nicod totalement ! Je te conseille fortement de consulter la démo de @Una
https://codepen.io/una/pen/mdOgyVL . Sur des interfaces à base de cartes ça fonctionne particulièrement bien. Très efficace pour écrire un seul composant qui s'adapte en fonction de son contenu.
#ContainerQueries #DefensiveCSS #ResilientCSS #ResponsiveToTheContainer
#responsivetothecontainer #resilientcss #defensivecss #ContainerQueries
Mixing #ContainerQueries, #Typography, #Clamp and #ContainerQueriesUnits from @fonts → "Our text will never get too big or too small and if a dev throws that paragraph into a sidebar or a card or something then our text will always look good."
"what hundreds of lines of CSS hacks could be cut down to with container queries:
p {
font-size: clamp(1rem, 2.5cqw, 2rem);
line-height: clamp(1.35rem, 3.5cqw, 1.9rem);
}"
https://www.robinrendle.com/notes/container-queries-and-typography/
#resilientcss #defensivecss #css #containerqueriesunits #clamp #typography #ContainerQueries