CSS Supports Generator
Visually build @supports feature queries with and / or / not operators and modern presets
Click any preset to append a feature test. Hover for a quick description.
Live test via CSS.supports(). Reflects this browser only — your visitors may differ.
(display: grid)
@supports (display: grid) {
.card {
/* progressive enhancement styles */
}
}Just the @supports rule. Toggle the fallback option to also include a @supports not block.
Common @supports Conditions Reference
| Condition | Detects | Notes |
|---|---|---|
| (display: grid) | CSS Grid Layout | Baseline since 2017 |
| (grid-template-columns: subgrid) | CSS Subgrid | Chrome 117+, Safari 16+ |
| (container-type: inline-size) | CSS Container Queries | All modern browsers since 2023 |
| (anchor-name: --x) | CSS Anchor Positioning | Chrome 125+ only as of 2026 |
| (color: color-mix(in srgb, red, blue)) | color-mix() function | All modern browsers since 2023 |
| (view-transition-name: x) | CSS View Transitions | Chrome/Safari shipped; Firefox in progress |
| (text-wrap: balance) | Balanced text wrapping | All modern browsers |
| selector(:has(*)) | :has() parent selector | All modern browsers since 2023 |
| selector(&) | CSS Nesting | All modern browsers since 2024 |
About CSS Supports Generator
The CSS Supports Generator is a free online tool that builds copy-ready @supports feature queries. Combine property/value tests like (display: grid) with selector tests like selector(:has(img)), chain them with and / or / not, and copy the resulting CSS.
Feature queries are the cleanest way to ship progressive enhancement: layer modern features (subgrid, container queries, anchor positioning, color-mix, view transitions, :has()) on top of a baseline that works everywhere, without breaking old browsers. The optional @supports not block makes it easy to scope fallback styles too.
The live "Your Browser" indicator uses CSS.supports() to test the conditions you build against the browser you are using right now. Everything runs locally — nothing is sent to a server. Pairs nicely with the Container Query Generator and Media Query Builder.
How to Use CSS Supports Generator
- 1. Enter the target selector for the CSS block you want to wrap (e.g.
.card). - 2. Choose a test kind: Property / value for things like
(display: grid), or Selector for things likeselector(:has(img)). - 3. Fill in the property and value, or the selector. Toggle not to invert a single test.
- 4. Click Add feature test to chain another condition, then pick
andororas the operator. - 5. Use the Modern Feature Presets to insert tests for subgrid, container-type, anchor-name, color-mix, view transitions,
:has(), and more — instantly. - 6. Optionally enable Include fallback to also emit a
@supports not (...)block for legacy styles. - 7. Check the Your Browser badge to confirm support, then click Copy and paste into your stylesheet.
Common Use Cases
Ship CSS subgrid safely
Wrap subgrid styles in @supports (grid-template-columns: subgrid) and fall back to explicit grid tracks for browsers without subgrid support.
Adopt :has() progressively
Use @supports selector(:has(*)) to layer parent-selector styles on top of a JS-free baseline, without breaking older browsers that ignore :has().
Roll out container queries
Detect container-type support before applying @container rules, so old browsers keep the simpler fallback layout.
Anchor positioning
Anchor positioning ships in Chrome ahead of other browsers. @supports (anchor-name: --x) gates the new layout while keeping a portable fallback.
Modern color spaces
Use @supports (color: color-mix(in srgb, red, blue)) or (color: oklch(70% 0.15 200)) to ship rich gradients and brand colors only where they actually render.
View transitions
Animate page transitions with @supports (view-transition-name: card), gracefully degrading to instant navigation elsewhere.
CSS nesting
Use @supports selector(&) to ship nested CSS directly to browsers that understand it, while keeping a flattened build for the rest.
Form control theming
Gate accent-color, scrollbar-color, and scrollbar-gutter behind @supports so you only override defaults when the property is actually honored.