Today I Learned - Rocky Kev

TIL CSS @Supports Rule

POSTED ON:

TAGS:

Today I learned about the CSS @Supports Rule

The CSS @supports rule is a great way to check for a new CSS feature. For example, CSS comparison functions became supported in late 2019 - early 2020 and we don't have to wait for a year to use them.

@supports (width: clamp(20px, 10vw, 50px)) {
// do something..
}

VIA https://ishadeed.com/article/cross-browser-development/


Related TILs

Tagged:

TIL the alternate keyword

If 'alternate' appears along with the stylesheet keyword, the linked file is an alternative stylesheet. It won’t be applied to the document, but it will be ready for when we need it.

TIL Logical Properties

For that sweet sweet Internationalization you want to avoid directional words like 'left', 'right', 'top', and 'bottom'.

TIL Using pseudo-classes in your querySelector!

let notTuna = document.querySelectorAll('.sandwich:not(.tuna)')