CSS compatibility means that our styles should appear the same across different browsers and versions. This is critical to ensure a consistent user experience.
Vendor prefixes help use experimental CSS properties until they become standardized. For example, -webkit- for Safari and Chrome, -moz- for Firefox.
This example demonstrates how to use vendor prefixes in a simple border-radius setting.
@supports allows us to conditionally apply CSS rules depending on whether the browser supports a given property.
This example shows how to set up a flexible layout that uses grid if available, otherwise flexbox.
| Feature | Chrome | Firefox | Safari | Edge |
|---|---|---|---|---|
| Flexbox | ✔ | ✔ | ✔ | ✔ |
| CSS Grid | ✔ | ✔ | 12+ | ✔ |
| mask-image | ✔ | ✔ | ✔ | ✘ |
Some best practices to make sure your CSS works reliably in all browsers.
✨ Ask Lara — your AI study partner
Unlock personalized learning support. Lara can explain lessons, summarize topics, and answer your study questions — available from the Go plan and above.
Lara helps you learn faster — exclusive to ReadyTools Go, Plus, and Max members.