10865 shaares
395 private links
395 private links
CSS has gotten easier to write than it is different to write.
- use
:isto group multiple selectors such asa:hoveranda:focus - using logical properties instead of marg
margin-trimcan help by removing the last margin child element of a list for example. It is experimental, so Flexbox with the gap propertyaspect-ratioto set only one dimension between the height and the width, while keeping proportions.card:has(:hover, :focus)is easier and straightforward thana.card-link:hover > .card- an easier way to define color palette with
--gray-dark: color-mix(in srgb, var(--primary-color), [#fff](https://shaarli.lyokolux.space/./add-tag/fff) 25%);. It is more maintainable! chfor managing line lengths;text-wrap: balanceis a work in progress (65% of users can use it)
and more with cascade layers, container queries, <selectmenu> and CSS nesting