sodcalculator

10 Tech How-To

CSS Browser Support: How to Check It

Guide 10-32075 · Updated · Step by step

To check CSS browser support, use online compatibility tables like Can I Use, or check the feature’s official specification and browser release notes. These resources tell you which browsers and versions support a given CSS property, value, or feature.

Why Browser Support Matters

CSS is constantly evolving. New properties, values, and functions are added to the specification, but browsers implement them at different speeds. If you use a feature that a visitor’s browser doesn’t support, the browser may ignore the declaration, apply an incorrect style, or even break the layout. Checking support helps you write CSS that degrades gracefully, so your site remains usable and attractive for everyone.

The Main Tools for Checking Support

  • Can I Use (caniuse.com) – The most popular resource. It provides detailed tables showing support across all major browsers and versions, along with notes and known issues.
  • MDN Web Docs (developer.mozilla.org) – Each CSS property page includes a browser compatibility table, often with more technical detail than Can I Use.
  • Official W3C Specifications – The spec itself may note which features are in draft or stable status, but it doesn’t list browser support directly.
  • Browser release notes and developer blogs – For the newest features, check the official blog of Chrome, Firefox, Safari, or Edge to see when a feature shipped.

How to Read a Can I Use Table

When you look up a feature on Can I Use, you’ll see a grid of browsers (Chrome, Firefox, Safari, Edge, etc.) with versions. Green cells mean full support, yellow means partial support (often with a note), and red means no support. The table also shows the first version that supported the feature. For example, the gap property for flexbox was supported in Chrome 84 (July 2020), but earlier versions required a different approach.

Pay attention to the notes below the table. They often explain edge cases, such as a property working only with a vendor prefix (-webkit- or -moz-) or only in certain contexts.

Using Vendor Prefixes and Fallbacks

When a feature is not universally supported, you can provide fallbacks. The most common approach is to write a standard declaration and then a prefixed one before it:

/* Fallback for older browsers */
background: #fff;
/* Newer feature */
background: color-mix(in srgb, #fff 50%, #000);

Browsers that don’t understand the second declaration simply ignore it. For some features, you may need to use vendor prefixes:

.element {
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  user-select: none;         /* Standard */
}

However, modern browsers rarely require prefixes for standard properties. Use them only when a tool like Can I Use indicates they are needed.

How to Choose Which Browsers to Support

You don’t need to support every browser version. Instead, look at your site’s analytics to see which browsers your visitors actually use. Tools like Google Analytics or your hosting provider’s logs can show this. Then, target the last two or three major versions of each popular browser. For example, if 95% of your visitors use Chrome, Firefox, or Safari, you can usually use features that are supported in those browsers’ recent versions.

For public sites, a common baseline is to support browsers that are still receiving security updates. This typically means the last two versions of each major browser. You can check the current versions on each browser’s official site.

Common Misconceptions and Problems

One common misconception is that if a feature is in the CSS specification, all browsers support it. That’s not true. A spec can be a Working Draft for years before browsers implement it. Another misconception is that “partial support” means the feature works everywhere except a few minor bugs. In reality, partial support can mean the feature is completely non-functional in certain browsers, or only works with a prefix.

Another issue is that some features are only supported in certain contexts. For example, the gap property works in flexbox in modern browsers, but older versions only supported it in CSS Grid. Always check the notes on Can I Use for such context-specific limitations.

Automated Checking with Tools

You don’t have to check every property manually. Build tools like Autoprefixer can automatically add vendor prefixes based on your target browsers. You can also use stylelint with plugins to warn you about unsupported properties. For a quick check during development, the browser’s DevTools can show you in the Styles panel whether a property is recognized (it will be crossed out if not).

For a comprehensive audit, you can use services like BrowserStack or Sauce Labs to test your site on real devices and browser versions, but those are paid services. For most projects, Can I Use plus a fallback strategy is sufficient.

Frequently Asked Questions

How do I check if a CSS property works in a specific browser version?

Go to Can I Use and type the property name in the search box. The table will show you support for each browser and version. You can also click on the browser version number to see the exact release date and any notes.

What does “partial support” mean on Can I Use?

It means the feature is not fully implemented. Read the notes to see what exactly is missing. For example, a property might work only with a vendor prefix, or only in certain situations (like only in Grid, not Flexbox).

Should I use vendor prefixes anymore?

Only if Can I Use shows that a prefix is required for the browsers you support. Many older prefixes are no longer needed. Autoprefixer can handle this automatically if you set your target browsers.

How do I provide a fallback for an unsupported CSS feature?

Write a basic declaration first, then a more advanced one after it. Browsers that don’t understand the advanced one will ignore it and use the basic one. For example, for a CSS grid layout, you might set display: block; first, then display: grid;.

Is it safe to use a CSS feature if it’s in the latest Chrome and Firefox?

It depends on your audience. If your analytics show that most visitors use those browsers, it’s usually safe. But for public sites, you should also consider Safari and Edge. Check Can I Use to see if all your target browsers support it.

How often do browser support tables update?

Can I Use is updated regularly, often multiple times per week. MDN also updates its compatibility data frequently. For the most accurate information, rely on these sources rather than old blog posts.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →