9224 shaares
217 private links
217 private links
CSS has gotten easier to write than it is different to write.
- use
:is
to group multiple selectors such asa:hover
anda:focus
- using logical properties instead of marg
margin-trim
can help by removing the last margin child element of a list for example. It is experimental, so Flexbox with the gap propertyaspect-ratio
to 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! ch
for managing line lengths;text-wrap: balance
is a work in progress (65% of users can use it)
and more with cascade layers, container queries, <selectmenu>
and CSS nesting