Check a Feature's Browser Support

Your stylesheet now uses container queries, :has(), and nesting, and none of them existed in browsers a few years ago. Rosa’s neighbors check the garden’s site on whatever phone or laptop they have, and some of those browsers are older than your CSS.

In this lesson, you’ll check a feature’s support and decide whether to use it as is, use it as an enhancement, or leave it out. You’ll also write the fallbacks that keep the page working where a feature is missing. Start with the check you’ll make for every newer feature.

Decide From the Baseline Badge

A feature’s browser support determines how you use it, so you need a quick, reliable way to look it up. The Baseline badge at the top of the feature’s MDN page gives you one of three statuses:

  • Widely available: It has worked in every major browser (Chrome, Edge, Firefox, and Safari) for at least 30 months.
  • Newly available: It has worked in the current version of each of them, but for less time than that.
  • Limited availability: At least one of them doesn’t support it yet.

webstatus.dev shows the same statuses in one searchable list, which is handy when you check several features at once.

The status leads to one of three decisions:

  • Use it as is when it’s Widely available, a sensible default for visitors on up-to-date browsers. Widely available doesn’t promise support in every browser, though, because it excludes older versions and browsers beyond the four main ones. If you know some visitors use older browsers, check the version that added the feature in the compatibility table at the bottom of its MDN page, and make sure your page works without it.
  • Use it as an enhancement when its status is Newly available or Limited availability but the page still works without it. You decide what the other browsers get.
  • Leave it out when the page needs it and nothing can stand in for it.

Here’s how that plays out for the newer features of the garden’s site in November 2026:

Feature Status Decision
Container size queries Widely available since August 2025 Use as is
:has() Widely available since June 2026 Use as is
Nesting Widely available since June 2026 Use as is
Anchor positioning, which pins a box beside another element, such as a note beside a plot on the map Newly available since January 2026, when Firefox added it Leave out: in a Firefox or Safari from before it, the note would land in the wrong place

:has() and nesting crossed the line only in June. A few months earlier, a browser that didn’t know nesting would have skipped your nested card rules. Statuses change, so check them whenever you use a newer feature.

Your stylesheet uses three more features from the last few years that aren’t in the table. Make the check yourself for the @layer rules at the top of garden-practice/style.css, the oklch() colors in its tokens layer, and text-wrap: balance in the h1, h2 rule in base. Look up each one on MDN or webstatus.dev, and note its status today, your decision, and what a visitor whose browser lacks it would see.

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Become a Member to join the conversation.