Responsive Web Design with HTML5 and CSS by Ben Frain

Responsive Web Design with HTML5 and CSS by Ben Frain

Author:Ben Frain
Language: eng
Format: epub, mobi
Tags: COM060130 - COMPUTERS / Web / Design, COM051000 - COMPUTERS / Programming / General, COM060090 - COMPUTERS / Internet / Application Development
Publisher: Packt
Published: 2020-04-29T05:30:13+00:00


Here, we are defining one block of code for when the browser supports a feature, and another lot for when it doesn't. This pattern is fine if the browser supports @supports (yes, I realize that is confusing), but if it doesn't, it won't apply any of those styles.

If you want to cover off devices that don't support @supports, you're better off writing your default declarations first and then your @supports-specific one after. That way, the prior rule will be overruled if support for @supports exists, and the @supports block will be ignored if the browser doesn't support it. Our prior example could, therefore, be reworked to:

.Item { display: inline-flex; } @supports (display: grid) { .Item { display: inline-grid; } }



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.