This is my summary for a YouTube series, Resilient CSS.
TLDR
- Look up the stats of browser usage by region to define your device/browser support
- Consult caniuse.com, MDN, Bugzilla, etc.
- Browser usage can be measured by country in caniuse.com
- "What will happen if I were to cross out that line of CSS?"
- Use well-supported property/value as fallback
- I am not sure if the principles can be applied to Atomic CSS
"How Browsers Handle Errors in CSS"
Mindset for writing CSS that supports every browser
"What happens if I were to cross out that line of CSS?"
Since unsupported/misspelled CSS properties are just NOT applied, comment the code out to mimic the experience when the property is not supported by the browser.
"Unlocking the Power of CSS Overrides - Small Tweaks"
The important thing here is to be able to read the article and get some of the feeling of graphics of the article. And every user is going to get that with this code.
Use Well-Supported Property/Value as Fallback
If the Browser Supports One Property but not the Other
"Feature Queries"
Syntax
Example
One Way to Use Feature Query
Take display: grid;
for Example:
- Figure out how HTML content will be should there be no CSS at all. This is to make sure HTML markup is solid in the first place.
- Write CSS without grid layout
- Write CSS with grid layout in feature query, knowing that your CSS will be awesome ;)
"Making Your CSS Fail Excellently"
Example 1 - Might Explode
When fails, it delivers completely different experience.
Example 2 - Use Fallback Properties
If fails, it gives a some-what different experience.
Example 3 - Use Well-Supported Properties Only
Maybe the failure isn't worth it. Use properties that are well-supported to achieve the same goal.