2

I realize this may be a dumb question because I am returning to web dev after some time anyway, so please don't be shy to enlighten me! To me it seems that the art of css hacks (like back in the day to sniff out old IE browsers) could be used to fill the gap between the new-ish @supports queries and old browsers that do not support these features. Potential to save yourself and your site from alot of javascript? Even aid in dropping javascript altogether in small projects. Is anyone aware of any projects like this? It is also possible I have failed to search with proper keywords...

3

1 Answer 1

1

Yes, you can do this with the next commands:

The all following examples are valid:

@supports not (not (transform-origin: 2px)) - for test browser on non-support

or

@supports (display: grid) - for test browser on support

or

@supports (display: grid) and (not (display: inline-grid)). - for test both

See MDN for more info: https://developer.mozilla.org/en-US/docs/Web/CSS/@supports

Sign up to request clarification or add additional context in comments.

1 Comment

<!-- legacy cascade --> <link rel="stylesheet" href="legacy.css"> <!-- modern cascade, overwrites legacy if argument is satisfied --> @supports ( color: rgb(255,255,255,0.5) ) { @import url("modern.css"); @media ... @supports ... ... } In this case I test to see if modern colors are accepted with alpha (transparency) and then safely apply more modern sugar correct? @BoltClock

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.