196 features · 77 demos written for this site · the rest illustrated by MDN

Modern CSS,
live.

Every CSS feature that reached Baseline, or shipped in a browser engine, in 2023 or later, as web-features names and describes it. Each one renders below, in your browser, with the code to edit and copy. Demos written for this site say so in their window bar; the others are MDN's own examples.

Newly available

Baseline newly available: supported by the latest version of every major browser. Safe to use with a fallback for older versions.

Scroll-driven animations

Newly available since October 2026 Scrolling

web-features The animation-timeline, scroll-timeline, and view-timeline CSS properties advance animations based on the user's scroll position.

Scroll-driven animations Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

Dashed chips belong to the same feature but this demo does not use them.

.sda { max-width: 640px; margin: 0 auto; }

.sda .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fef3c7; color: #78350f; }
@supports not (animation-timeline: scroll()) { .sda .unsupported { display: block; } }

.sda-scroller {
  height: 380px;
  overflow-y: auto;
  border: 2px solid #c4b5fd;
  border-radius: 16px;
  background: #f5f3ff;
}
.sda-scroller:focus-visible { outline: 3px solid #5b21b6; outline-offset: 2px; }

.sda-head { position: sticky; top: 0; z-index: 1; padding: 14px 18px 0; background: linear-gradient(#ddd6fe, #ddd6fe) bottom / 100% 8px no-repeat, #ede9fe; }
.sda-head h1 { margin: 0 0 12px; font-size: 1.1rem; }

.sda-bar { height: 8px; margin: 0 -18px; background: linear-gradient(90deg, #7c3aed, #ec4899); }

.sda-list { margin: 0; padding: 16px 18px 40px; list-style: none; display: grid; gap: 150px; }
.sda-card { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 14px; background: #fff; box-shadow: 0 6px 20px rgb(76 29 149 / 0.15); }
.sda-card:nth-child(even) { flex-direction: row-reverse; text-align: right; }
.sda-card h2 { margin: 0 0 4px; font-size: 1rem; }
.sda-card p { margin: 0; color: #44403c; font-size: 0.9rem; }
.sda-num { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #6d28d9; color: #fff; font-weight: 700; }

@supports (animation-timeline: scroll()) {
  /* scroll(): progress follows how far the nearest scroll container is scrolled. */
  .sda-bar {
    transform-origin: 0 50%;
    animation: sda-grow linear both;
    animation-timeline: scroll(nearest block);
  }
  /* view(): progress follows the card crossing the scrollport. */
  .sda-card {
    animation: sda-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
  .sda-card:nth-child(even) { --sda-from: 90px; --sda-r: 4deg; }
  .sda-card:nth-child(odd) { --sda-from: -90px; --sda-r: -4deg; }
}

@keyframes sda-grow { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes sda-reveal {
  from { opacity: 0; translate: var(--sda-from) 0; rotate: var(--sda-r); scale: 0.85; }
  to { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .sda-card { animation: none; }
}

Browser support

First browser version supporting the whole Scroll-driven animations feature
Chrome 115
Edge 115
Firefox 159
Safari 26
Chrome Android 115
Safari iOS 26

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

alpha()

Newly available since September 2026 Color types

web-features The alpha() CSS function computes a relative color value by adjusting the opacity of an origin color.

Live preview Example from MDN
:root {
  --my-color: oklch(60% 0.25 315 / 0.3);

  /* Same color, but with alpha set to 80% */
  --my-color-80: alpha(from var(--my-color) / 80%);
}

.box1 {
  background-color: var(--my-color);
}

.box2 {
  background-color: var(--my-color-80);
}

body {
  font-family: sans-serif;
  display: flex;
  gap: 10%;
  justify-content: center;
}

div {
  width: 40%;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
}

In the reference

The example above is MDN's example for alpha().

Browser support

First browser version supporting the whole alpha() feature
Chrome 152
Edge 152
Firefox 155
Safari 27
Chrome Android 152
Safari iOS 27

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Animation accessors

Newly available since September 2026 Animation

web-features The animation property of an AnimationEvent or TransitionEvent object is the Animation object that represents the animation (and thus the element) that fired an animation event.

No demo written yet and no MDN example for this feature: read its definition through the links below.

Browser support

First browser version supporting the whole Animation accessors feature
Chrome 151
Edge 151
Firefox 152
Safari 27
Chrome Android 151
Safari iOS 27

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

light-dark() image values

Newly available since September 2026

web-features The light-dark() CSS function accepts, in addition to colors, two <image> values, such as a gradient or URL, and uses one depending on the current color scheme.

Live preview Example from MDN
:root {
  /* this has to be set to switch between light or dark */
  color-scheme: light dark;

  --light-bg: ghostwhite;
  --light-color: darkslategray;
  --light-code: tomato;

  --dark-bg: darkslategray;
  --dark-color: ghostwhite;
  --dark-code: gold;
}
* {
  background-color: light-dark(var(--light-bg), var(--dark-bg));
  color: light-dark(var(--light-color), var(--dark-color));
}
code {
  color: light-dark(var(--light-code), var(--dark-code));
}

.light {
  /* forces light color-scheme */
  color-scheme: light;
}
.dark {
  /* forces dark color-scheme */
  color-scheme: dark;
}

section {
  padding: 0.8rem;
}

In the reference

The example above is MDN's example for light-dark().

Browser support

First browser version supporting the whole light-dark() image values feature
Chrome 150
Edge 150
Firefox 150
Safari 27
Chrome Android 150
Safari iOS 27

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

overflow-anchor

Newly available since September 2026 Scrolling

web-features The overflow-anchor CSS property sets an element as a possible scroll anchor, reducing unintended scrolling when document changes occur above the current scrollport. This is enabled by default where supported.

Live preview Example from MDN
.whole-content-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

#example-element {
  height: 100%;
  border: 2px dashed dodgerblue;
  padding: 0.75em;
  text-align: left;
  overflow: scroll;
}

#playback {
  font-size: 1em;
  width: 10em;
  height: 4em;
  font-weight: bold;
  margin: 1em auto;
  background-color: aliceblue;
  border: solid 2px dodgerblue;
  border-radius: 5px;
}

#playback:hover {
  border-color: lightseagreen;
}

#playback:active {
  filter: brightness(0.9);
}

In the reference

The example above is MDN's example for overflow-anchor.

Browser support

First browser version supporting the whole overflow-anchor feature
Chrome 56
Edge 79
Firefox 66
Safari 27
Chrome Android 56
Safari iOS 27

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

revert-rule

Newly available since September 2026 Explicit defaults

web-features The revert-rule CSS keyword resets a property to its previous value in the cascade, as if the current style rule had not been present. It's especially useful with conditionals, to cancel a declaration when the condition is not met.

No demo written yet and no MDN example for this feature: read its definition through the links below.

Browser support

First browser version supporting the whole revert-rule feature
Chrome 148
Edge 148
Firefox 150
Safari 27
Chrome Android 148
Safari iOS 27

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

progress()

Newly available since September 2026 CSS

web-features The progress() CSS function returns a ratio for the relative position of one value between two other values, clamped between 0 and 1. You can use it to interpolate a value for other calculations.

progress() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-pg, .demo-pg * { box-sizing: border-box; }
.demo-pg { --v: 50; max-width: 860px; margin: 0 auto; }
.demo-pg .hint { margin: 0 0 12px; }
.demo-pg .unsupported { display: none; margin: 0 0 12px; padding: 10px 12px; border: 2px dashed #b45309; border-radius: 8px; background: #fffbeb; }
@supports not (width: calc(progress(5, 0, 10) * 1px)) {
  .demo-pg .unsupported { display: block; }
}

.demo-pg .controls { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-weight: 600; }
.demo-pg .controls input { flex: 1; max-width: 420px; accent-color: #1d4ed8; }
.demo-pg .controls input:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }
.demo-pg output { min-width: 3ch; font-variant-numeric: tabular-nums; }

.demo-pg .label { margin: 0 0 8px; font-size: 0.9rem; }

.demo-pg .meter { height: 34px; margin-bottom: 26px; border-radius: 17px; background: #e2e8f0; overflow: hidden; }
.demo-pg .fill {
  height: 100%;
  /* progress() returns a plain number from 0 to 1: multiply it to get the unit you need. */
  width: calc(progress(var(--v), 20, 80) * 100%);
  background: hsl(calc(220 - progress(var(--v), 20, 80) * 200) 80% 45%);
  border-radius: 17px;
}

.demo-pg .resizable {
  container-type: inline-size;
  resize: horizontal;
  overflow: auto;
  width: 320px;
  min-width: 140px;
  max-width: 100%;
  padding: 12px 16px;
  border: 2px dashed #64748b;
  border-radius: 12px;
}
.demo-pg .grow {
  margin: 0 0 8px;
  font-weight: 700;
  line-height: 1.1;
  /* The same function, now measuring a length: the size follows the width of the box. */
  font-size: calc(1rem + progress(100cqw, 200px, 480px) * 2.4rem);
  color: hsl(calc(220 - progress(100cqw, 200px, 480px) * 200) 80% 38%);
}
.demo-pg .line { height: 10px; border-radius: 5px; background: #1d4ed8; width: calc(progress(100cqw, 200px, 480px) * 100%); min-width: 6px; }

Browser support

First browser version supporting the whole progress() feature
Chrome 138
Edge 138
Firefox 155
Safari 26
Chrome Android 138
Safari iOS 26

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

sibling-count() and sibling-index()

Newly available since August 2026 CSS

web-features The sibling-count() and sibling-index() CSS functions return integers that are useful to style elements based on their positions among siblings or on the number of siblings, for example as part of a calc() expression.

sibling-count() and sibling-index() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-sib, .demo-sib * { box-sizing: border-box; }
.demo-sib { max-width: 860px; margin: 0 auto; }
.demo-sib .hint { margin: 0 0 12px; }
.demo-sib .unsupported { display: none; margin: 0 0 12px; padding: 10px 12px; border: 2px dashed #b45309; border-radius: 8px; background: #fffbeb; }
@supports not (width: calc(sibling-index() * 1px)) {
  .demo-sib .unsupported { display: block; }
}

.demo-sib .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.demo-sib button { font: inherit; font-weight: 600; padding: 8px 16px; border: 2px solid #1b1b1b; border-radius: 8px; background: #fff; color: #1b1b1b; cursor: pointer; }
.demo-sib button:hover { background: #eef2ff; }
.demo-sib button:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.demo-sib output { font-variant-numeric: tabular-nums; }

.demo-sib .fan {
  counter-reset: card;
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 230px;
  margin: 0;
  padding: 0 64px 16px;
}

.demo-sib .fan li {
  counter-increment: card;
  flex: 0 1 110px;
  min-width: 0;
  height: 160px;
  margin-inline: -6px;
  display: grid;
  place-items: start center;
  padding-top: 12px;
  border: 3px solid #fff;
  border-radius: 14px;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  transform-origin: 50% 100%;
  /* Spread the cards over a fixed 56deg arc: the angle comes from the position and the count only. */
  rotate: calc(((sibling-index() - 1) / max(sibling-count() - 1, 1) - 0.5) * 56deg);
  /* Spread hues evenly from the first card to the last. */
  background: oklch(0.45 0.16 calc(360 / sibling-count() * sibling-index()));
  box-shadow: 0 6px 14px rgb(0 0 0 / 0.25);
  /* Stagger the entrance by position. */
  animation: deal 0.5s ease-out backwards;
  animation-delay: calc(sibling-index() * 70ms);
  transition: rotate 0.4s, background-color 0.4s;
}
.demo-sib .fan li::before { content: counter(card); }
.demo-sib .fan li.new { animation-delay: 0s; }

@keyframes deal {
  from { opacity: 0; translate: 0 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-sib .fan li { animation: none; transition: none; }
}

Browser support

First browser version supporting the whole sibling-count() and sibling-index() feature
Chrome 138
Edge 138
Firefox 154
Safari 26.2
Chrome Android 138
Safari iOS 26.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

field-sizing

Newly available since June 2026 CSS

web-features The field-sizing CSS property allows form controls such as <textarea> to be sized based on their content.

field-sizing Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-fs { max-inline-size: 640px; }
.demo-fs .unsupported { display: none; padding: 10px 14px; border-radius: 8px; background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
@supports not (field-sizing: content) { .demo-fs .unsupported { display: block; } }

.demo-fs .mode { display: flex; gap: 16px; margin: 0 0 8px; padding: 6px 12px 8px; border: 1px solid #d4d4d8; border-radius: 8px; }
.demo-fs .mode label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: ui-monospace, monospace; }
.demo-fs .hint { margin: 0 0 14px; color: #52525b; }
.demo-fs .sentence { margin: 0 0 10px; font-size: 1.25rem; }
.demo-fs .sentence label { display: block; }

.demo-fs input.inline, .demo-fs textarea {
  box-sizing: border-box;
  font: inherit;
  color: #1b1b1b;
  border: 2px solid #c7d2fe;
  border-radius: 10px;
  background: #eef2ff;
}
.demo-fs input.inline { padding: 2px 10px; }
.demo-fs input.inline:focus-visible, .demo-fs textarea:focus-visible { outline: 3px solid #4f46e5; outline-offset: 2px; }

/* The one property: the field is as big as what is typed in it. */
.demo-fs input.inline { field-sizing: content; min-inline-size: 8ch; max-inline-size: 100%; }
.demo-fs textarea {
  field-sizing: content;
  display: block;
  min-inline-size: 8rem;
  max-inline-size: 100%;
  max-block-size: 8lh;
  padding: 10px 14px;
  resize: none;
}

.demo-fs .chat label { display: block; margin-block-end: 4px; font-weight: 600; }

/* The default behaviour, for comparison. */
.demo-fs:has(#mode-fixed:checked) input.inline { field-sizing: fixed; inline-size: 10rem; }
.demo-fs:has(#mode-fixed:checked) textarea { field-sizing: fixed; inline-size: 14rem; block-size: 3lh; }

Browser support

First browser version supporting the whole field-sizing feature
Chrome 123
Edge 123
Firefox 152
Safari 26.2
Chrome Android 123
Safari iOS 26.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Container style queries

Newly available since May 2026 Container queries

web-features Container style queries with the @container at-rule apply styles to an element based on the values of custom properties of its container.

Container style queries Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

/* The radios only change two custom properties on .stage. They never touch the cards. */
.demo-csq { --probe: on; display: grid; gap: 12px; }
.demo-csq .stage { --theme: light; --compact: false; display: grid; gap: 12px; }
.demo-csq .stage:has(#t-dark:checked) { --theme: dark; }
.demo-csq .stage:has(#t-sunset:checked) { --theme: sunset; }
.demo-csq .stage:has(#t-ocean:checked) { --theme: ocean; }
.demo-csq .stage:has(#compact:checked) { --compact: true; }
.demo-csq .pin { --theme: sunset; }

.demo-csq .controls { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 8px 12px; border: 1px solid #c9c9d3; border-radius: 8px; }
.demo-csq .controls legend { padding: 0 6px; font-size: 0.85rem; color: #444; font-family: ui-monospace, monospace; }
.demo-csq .controls label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.demo-csq .controls input { accent-color: #4a3fd0; }
.demo-csq .controls input:focus-visible { outline: 3px solid #e0489b; outline-offset: 2px; }

.demo-csq .scene {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background: #eef0f6;
  transition: background 0.3s;
}
.demo-csq .profile {
  display: flex;
  gap: 14px;
  height: 100%;
  box-sizing: border-box;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  color: #1b1b1b;
  box-shadow: 0 2px 8px #0002;
  transition: background 0.3s, color 0.3s, padding 0.3s;
}
.demo-csq .avatar { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #4a3fd0; color: #fff; font-weight: 700; }
.demo-csq .info { display: grid; gap: 4px; justify-items: start; }
.demo-csq h2 { margin: 0; font-size: 1.15rem; }
.demo-csq .role { margin: 0; font-size: 0.85rem; opacity: 0.75; }
.demo-csq .bio { margin: 4px 0; font-size: 0.9rem; }
.demo-csq button { padding: 6px 14px; border: 0; border-radius: 8px; background: #4a3fd0; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.demo-csq button:focus-visible { outline: 3px solid #e0489b; outline-offset: 2px; }

/* Each rule asks the nearest ancestor: what is your --theme? */
@container style(--theme: dark) {
  .demo-csq .scene { background: #0d0d16; }
  .demo-csq .profile { background: #24243a; color: #f1f1ff; }
  .demo-csq .avatar, .demo-csq button { background: #9d92ff; color: #14142a; }
}
@container style(--theme: sunset) {
  .demo-csq .scene { background: #ffd9b8; }
  .demo-csq .profile { background: #7a1f3d; color: #fff1e6; }
  .demo-csq .avatar, .demo-csq button { background: #ffb347; color: #4a1024; }
}
@container style(--theme: ocean) {
  .demo-csq .scene { background: #bfe7f2; }
  .demo-csq .profile { background: #0b4f6c; color: #eafaff; }
  .demo-csq .avatar, .demo-csq button { background: #5ee0c4; color: #06302f; }
}
@container style(--compact: true) {
  .demo-csq .profile { padding: 8px 12px; align-items: center; }
  .demo-csq .avatar { width: 36px; height: 36px; font-size: 0.8rem; }
  .demo-csq .bio { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-csq .scene, .demo-csq .profile { transition: none; }
}

/* Style queries cannot be tested with @supports: this message hides itself when one matches. */
.demo-csq .unsupported { display: block; margin: 0; padding: 8px 12px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@container style(--probe: on) {
  .demo-csq .unsupported { display: none; }
}

Browser support

First browser version supporting the whole Container style queries feature
Chrome 111
Edge 111
Firefox 151
Safari 18
Chrome Android 111
Safari iOS 18

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

:open

Newly available since May 2026 Selectors

web-features The :open CSS pseudo-class matches elements that have open states, like <details>, <dialog>, or <select>, based on their state.

:open Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-open { max-width: 46rem; margin: 0 auto; }
.demo-open .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not selector(:open) {
  .demo-open .unsupported { display: block; }
}

.demo-open .hint { margin: 0 0 14px; color: #5b5b66; }
.demo-open .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 14px; }

.demo-open .card {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 7.5rem;
  padding: 14px 16px;
  border: 2px solid #d4d4dc;
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.demo-open h2 { margin: 0; font-size: 0.95rem; font-family: ui-monospace, monospace; }

/* The badge reads the state of whatever control the card contains. */
.demo-open .card::after {
  content: "closed";
  position: absolute;
  top: 12px;
  right: 14px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #ececf2;
  color: #5b5b66;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.demo-open .card:has(:open) { border-color: #0d9488; background: #f0fdfa; box-shadow: 0 10px 24px -14px #0d9488; }
.demo-open .card:has(:open)::after { content: "open"; background: #0d9488; color: #fff; }

.demo-open summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
.demo-open summary::before { content: ""; width: 0.5rem; height: 0.5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.2s; }
.demo-open details:open > summary { color: #0f766e; }
.demo-open details:open > summary::before { transform: rotate(45deg); }
.demo-open details p { margin: 8px 0 0; }

.demo-open select, .demo-open input, .demo-open button {
  box-sizing: border-box;
  padding: 8px 12px;
  border: 2px solid #b8b8c4;
  border-radius: 10px;
  background: #fff;
  font: inherit;
}
.demo-open select:open, .demo-open input:open { border-color: #0d9488; background: #ccfbf1; }
.demo-open button { border-color: #0f766e; background: #0f766e; color: #fff; font-weight: 600; cursor: pointer; justify-self: start; }
.demo-open :focus-visible { outline: 3px solid #0f766e; outline-offset: 2px; }

.demo-open dialog {
  position: static;
  margin: 0;
  width: auto;
  padding: 10px 14px;
  border: 2px solid #0d9488;
  border-radius: 12px;
  background: #fff;
  color: #1b1b1b;
}
.demo-open dialog:open { animation: pop 0.25s ease-out; }
.demo-open dialog p { margin: 0 0 8px; }
.demo-open dialog button { padding: 4px 14px; }

@keyframes pop { from { opacity: 0; transform: scale(0.9); } }

@media (prefers-reduced-motion: reduce) {
  .demo-open .card, .demo-open summary::before { transition: none; }
  .demo-open dialog:open { animation: none; }
}

.demo-open .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

Browser support

First browser version supporting the whole :open feature
Chrome 133
Edge 133
Firefox 136
Safari 26.5
Chrome Android 133
Safari iOS 26.5

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

crisp-edges

Newly available since May 2026 Image scaling

web-features The image-rendering: crisp-edges CSS declaration scales images to preserve lines without blurring.

Live preview Example from MDN
#example-element {
  height: 480px;
  object-fit: cover;
}

In the reference

The example above is MDN's example for image-rendering.

Browser support

First browser version supporting the whole crisp-edges feature
Chrome 148
Edge 148
Firefox 65
Safari 7
Chrome Android 148
Safari iOS 7

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Name-only container queries

Newly available since May 2026 Container queries

web-features Name-only container queries with the @container … at-rule apply styles to an element based on the name of the element's container alone.

Live preview Example from MDN
span {
  display: block;
  text-align: center;
}
.card {
  margin: 10px;
  border: 2px dotted;
  font-size: 1.5em;
}
.post {
  border: 2px solid;
}

/* A container context based on inline size */
.post {
  container-type: inline-size;
}

/* Apply styles if the container is narrower than 650px */
@container (width < 650px) {
  .card {
    width: 50%;
    background-color: lightgray;
    font-size: 1em;
  }
}

In the reference

The example above is MDN's example for @container.

Browser support

First browser version supporting the whole Name-only container queries feature
Chrome 148
Edge 148
Firefox 149
Safari 26.4
Chrome Android 148
Safari iOS 26.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

text-decoration-skip-ink: all

Newly available since May 2026 Text

web-features The text-decoration-skip-ink: all CSS declaration forces interruptions in underlines and overlines where the line would cross a glyph. This contrasts with auto, which does not skip for CJK glyphs.

Live preview Example from MDN
p {
  font:
    1.9em "Georgia",
    serif;
  text-decoration: underline;
}

In the reference

The example above is MDN's example for text-decoration-skip-ink.

Browser support

First browser version supporting the whole text-decoration-skip-ink: all feature
Chrome 148
Edge 148
Firefox 75
Safari 15.4
Chrome Android 148
Safari iOS 15.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

contrast-color()

Newly available since April 2026 Color types

web-features The contrast-color() CSS function picks a color that has guaranteed contrast against a specified foreground or background color.

contrast-color() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-cc { max-width: 860px; margin: 0 auto; }
.demo-cc .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not (color: contrast-color(red)) {
  .demo-cc .unsupported { display: block; }
}
.demo-cc :focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

.demo-cc .picker { --bg: #2a9d8f; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.demo-cc .picker label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.demo-cc input[type="color"] { width: 48px; height: 32px; padding: 0; border: 1px solid #888; border-radius: 6px; }
.demo-cc .live {
  flex: 1; min-width: 200px; margin: 0; padding: 14px 16px; border-radius: 10px; font-size: 1.1rem; font-weight: 700;
  background: var(--bg);
  /* One declaration: the browser picks white or black for the best contrast. */
  color: contrast-color(var(--bg));
}

.demo-cc .label { margin: 16px 0 6px; font-size: 13px; font-weight: 600; }
.demo-cc .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.demo-cc .grid li {
  display: flex; justify-content: space-between; gap: 8px; padding: 14px 12px; border: 1px solid #0003; border-radius: 10px;
  font-size: 14px; font-weight: 600; background: var(--bg);
}
.demo-cc .fixed { color: white; }
.demo-cc .auto { color: contrast-color(var(--bg)); }

Browser support

First browser version supporting the whole contrast-color() feature
Chrome 147
Edge 147
Firefox 146
Safari 26
Chrome Android 147
Safari iOS 26

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

@scope

Newly available since March 2026 CSS

web-features The @scope CSS at-rule sets the scope for a group of rules.

@scope Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

/* Shown by default, hidden by the first @scope block below: a browser that ignores @scope keeps the message. */
.demo-scope .unsupported { margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; }

.demo-scope .tiles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px; }
.demo-scope .tile { padding: 14px; border: 1px solid #e2e2ea; border-radius: 14px; background: #fafafc; }
.demo-scope h2 { margin: 0 0 10px; font-size: 1rem; }
.demo-scope .box { padding: 10px; border-radius: 10px; }
.demo-scope .box p { margin: 0 0 8px; font-weight: 600; }
.demo-scope .pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 12px; }
.demo-scope .toggle { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; cursor: pointer; }
.demo-scope .card { padding: 12px; border-radius: 12px; }
.demo-scope .card h3 { margin: 0 0 6px; font-size: 1rem; }
.demo-scope .card p { margin: 0 0 8px; }
.demo-scope .slot { padding: 8px; border-radius: 8px; background: #fff; color: #1b1b1b; }
.demo-scope .slot p { margin: 0; }
.demo-scope:has(#limit:checked) .slot { outline: 3px dashed #1b1b1b; outline-offset: 2px; }
.demo-scope .toggle:has(:focus-visible) { outline: 3px solid #4338ca; outline-offset: 2px; }

@scope (.demo-scope) {
  .unsupported { display: none; }
}

/* Two rules for the same <p>: the scope root with fewer hops wins, whatever the source order. */
@scope (.light) {
  :scope { background: #eef0f5; border: 2px solid #c3c8d8; }
  p { color: #14161f; }
}
@scope (.dark) {
  :scope { background: #1c2033; border: 2px solid #4b5378; }
  p { color: #f3f4fb; }
}

/* A donut: the card is the upper bound, .slot is the lower bound and is left alone. */
@scope (.ocean) to (.slot) {
  :scope { background: #dff3fb; border: 2px solid #0e7490; }
  h3 { color: #0e7490; }
  a {
    display: inline-block;
    white-space: nowrap;
    padding: 1px 8px;
    border-radius: 999px;
    background: #0e7490;
    color: #fff;
    text-decoration: none;
  }
  a:hover, a:focus-visible { background: #164e63; outline: 2px solid #164e63; outline-offset: 2px; }
}
@scope (.sunset) to (.slot) {
  :scope { background: #fff0e0; border: 2px solid #c2410c; }
  h3 { color: #c2410c; }
  a {
    display: inline-block;
    white-space: nowrap;
    padding: 1px 8px;
    border-radius: 999px;
    background: #c2410c;
    color: #fff;
    text-decoration: none;
  }
  a:hover, a:focus-visible { background: #7c2d12; outline: 2px solid #7c2d12; outline-offset: 2px; }
}

@media (width < 700px) {
  .demo-scope .tiles { grid-template-columns: minmax(0, 1fr); }
}

Browser support

First browser version supporting the whole @scope feature
Chrome 143
Edge 143
Firefox 146
Safari 26.4
Chrome Android 143
Safari iOS 26.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

baseline-shift

Newly available since March 2026 Text

web-features The baseline-shift CSS property sets the position of an element relative to its dominant baseline.

Live preview Example from MDN
text {
  font-family: cursive;
  font-size: 2rem;
}
[baseline-shift="sub"] {
  fill: deeppink;
}
[baseline-shift="super"] {
  fill: rebeccapurple;
}

svg:nth-of-type(2) tspan {
  baseline-shift: sub;
}
svg:nth-of-type(3) tspan {
  baseline-shift: super;
}

svg {
  border: 1px solid;
  width: 15em;
  margin-bottom: 10px;
}
@supports not (baseline-shift: sub) {
  body::before {
    content: "Your browser doesn't support the `baseline-shift` property.";
    background-color: wheat;
    display: block;
    text-align: center;
    padding: 1rem 0;
  }
}

In the reference

The example above is MDN's example for baseline-shift.

Browser support

First browser version supporting the whole baseline-shift feature
Chrome 1
Edge 79
Firefox 149
Safari 4
Chrome Android 18
Safari iOS 3.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Custom highlights

Newly available since March 2026

web-features Custom highlights style arbitrary text ranges, without adding extra elements to the DOM.

Custom highlights Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-hl { max-width: 760px; margin-inline: auto; color: #1b1b1b; }

.demo-hl .unsupported {
  display: none;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fef3c7;
  color: #78350f;
}
@supports not selector(::highlight(a)) {
  .demo-hl .unsupported { display: block; }
}

.demo-hl .search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.demo-hl .search label { font-weight: 600; }
.demo-hl .search input { flex: 1 1 140px; min-width: 0; padding: 8px 10px; font: inherit; border: 1px solid #9ca3af; border-radius: 8px; }
.demo-hl .search button { padding: 8px 12px; font: inherit; border: 1px solid #4f46e5; border-radius: 8px; background: #eef2ff; color: #312e81; cursor: pointer; }
.demo-hl .search :focus-visible { outline: 3px solid #4f46e5; outline-offset: 1px; }
.demo-hl output { font-variant-numeric: tabular-nums; color: #4b5563; }

.demo-hl #doc { padding: 4px 18px; border-left: 4px solid #c7d2fe; line-height: 1.6; }

/* Two named highlights, registered from script with CSS.highlights.set().
   Only color, background-color, text-decoration and text-shadow are allowed here. */
::highlight(search) {
  background-color: #fde047;
  color: #1b1b1b;
}
::highlight(current) {
  background-color: #4f46e5;
  color: #fff;
  text-decoration: underline;
}

.demo-hl .dom { margin: 12px 0 0; font-size: 0.9rem; color: #4b5563; }
.demo-hl .dom output { font-weight: 700; color: #166534; }

Browser support

First browser version supporting the whole Custom highlights feature
Chrome 105
Edge 105
Firefox 149
Safari 17.2
Chrome Android 105
Safari iOS 17.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Math font family

Newly available since March 2026 MathML

web-features The font-family: math CSS declaration uses the browser default font face for displaying mathematical expressions.

No demo written yet and no MDN example for this feature: read its definition through the links below.

Browser support

First browser version supporting the whole Math font family feature
Chrome 109
Edge 109
Firefox 149
Safari 26.2
Chrome Android 109
Safari iOS 26.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

text-indent: each-line

Newly available since March 2026 Text

web-features The text-indent: each-line CSS declaration indents text after forced breaks as well as to the first line of a block.

Live preview Example from MDN
section {
  font-size: 1.25em;
  background-color: darkslateblue;
  align-items: start;
}

#example-element {
  text-align: left;
  margin-left: 3em;
  background-color: slateblue;
  color: white;
}

In the reference

The example above is MDN's example for text-indent.

Browser support

First browser version supporting the whole text-indent: each-line feature
Chrome 146
Edge 146
Firefox 121
Safari 15
Chrome Android 146
Safari iOS 15

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

text-indent: hanging

Newly available since March 2026 Text

web-features The text-indent: hanging CSS declaration indents all lines except the first.

text-indent: hanging Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-hang { --accent: #4f46e5; --indent: 2.5em; max-width: 46rem; margin-inline: auto; }
.demo-hang .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 12px; }
.demo-hang fieldset { display: flex; gap: 4px 14px; margin: 0; padding: 4px 12px 8px; border: 1px solid #cbd5e1; border-radius: 10px; }
.demo-hang legend { padding-inline: 4px; font: 0.85rem ui-monospace, monospace; color: #475569; }
.demo-hang label { cursor: pointer; }
.demo-hang input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.demo-hang .refs { padding: 4px 18px 10px; border: 2px solid #cbd5e1; border-radius: 12px; background: #fafaf9; font-family: Georgia, "Times New Roman", "Liberation Serif", serif; }
.demo-hang .refs h2 { margin: 10px 0 8px; font-size: 1.1rem; }

/* One declaration indents every line except the first. No padding, no negative margin. */
.demo-hang .entry {
  margin: 0 0 0.6em;
  font-size: 1.05rem;
  line-height: 1.5;
  text-indent: var(--indent) hanging;
}
.demo-hang:has(#m-none:checked) .entry { text-indent: 0; }
.demo-hang:has(#m-first:checked) .entry { text-indent: var(--indent); }

.demo-hang .unsupported { display: none; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #78350f; }
@supports not (text-indent: 1em hanging) {
  .demo-hang .unsupported { display: block; }
}

Browser support

First browser version supporting the whole text-indent: hanging feature
Chrome 146
Edge 146
Firefox 121
Safari 15
Chrome Android 146
Safari iOS 15

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

shape()

Newly available since February 2026 Clipping, shapes, and masking

web-features The shape() CSS function creates shapes with a series of commands like line, move, and curve. It can be used with clip-path and shape-outside.

shape() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-shape { max-width: 860px; margin-inline: auto; color: #1e1b4b; }
.demo-shape .hint { margin: 0 0 14px; color: #4b5563; }

.demo-shape .unsupported {
  display: none;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fef3c7;
  color: #78350f;
}
@supports not (clip-path: shape(from 0 0, line to 10px 10px)) {
  .demo-shape .unsupported { display: block; }
}

.demo-shape .row { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }

/* The drop shadow lives on the parent: it follows the clipped shape, and it
   doubles as the focus ring because an outline would be clipped away. */
.demo-shape .blob-wrap {
  width: 240px;
  max-width: 100%;
  filter: drop-shadow(0 10px 12px rgb(67 56 202 / 0.35));
}
.demo-shape .blob-wrap:has(.blob:focus-visible) {
  filter: drop-shadow(0 0 3px #1d4ed8) drop-shadow(0 0 3px #1d4ed8);
}

/* Both shapes use the same commands in the same order, so they interpolate. */
.demo-shape .blob {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 0;
  font: 700 1.2rem system-ui, sans-serif;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #db2777);
  cursor: pointer;
  clip-path: shape(
    from 45% 0%,
    curve to 100% 40% with 80% 0% / 100% 15%,
    curve to 60% 100% with 100% 75% / 85% 100%,
    curve to 0% 55% with 30% 100% / 0% 85%,
    curve to 45% 0% with 0% 20% / 15% 0%,
    close
  );
  transition: clip-path 0.7s ease;
}
.demo-shape .blob:is(:hover, :focus-visible) {
  clip-path: shape(
    from 60% 5%,
    curve to 95% 60% with 90% 0% / 100% 35%,
    curve to 40% 95% with 90% 90% / 65% 100%,
    curve to 5% 40% with 15% 100% / 0% 65%,
    curve to 60% 5% with 10% 15% / 30% 0%,
    close
  );
}

.demo-shape .wave-box {
  flex: 1 1 240px;
  min-width: 200px;
  max-width: 100%;
  overflow: auto;
  resize: horizontal;
}
/* Percentages and pixels mix: the edge stretches, the dip stays 40px. */
.demo-shape .wave {
  padding: 22px 22px 70px;
  color: #fff;
  background: linear-gradient(160deg, #0f766e, #2563eb);
  clip-path: shape(
    from 0 0,
    hline to 100%,
    vline to calc(100% - 40px),
    curve to 50% calc(100% - 40px) with 75% 100%,
    smooth to 0 calc(100% - 40px),
    close
  );
}
.demo-shape .wave h2 { margin: 0 0 6px; font-size: 1.3rem; }
.demo-shape .wave p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .demo-shape .blob { transition: none; }
}

Browser support

First browser version supporting the whole shape() feature
Chrome 135
Edge 135
Firefox 148
Safari 18.4
Chrome Android 135
Safari iOS 18.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Active view transition

Newly available since January 2026 View transitions

web-features The :active-view-transition CSS pseudo-class matches the root element when a view transition is active. The :active-view-transition-type() CSS pseudo-class matches only when the active view transition was started with the specified type.

Live preview Example from MDN
html {
  --bg: indigo;
}
main {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
section {
  background-color: var(--bg);
  height: 60px;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}
::view-transition-group(root) {
  animation-duration: 2s;
}

h2 {
  display: none;
  color: white;
}
:root:active-view-transition h2 {
  display: block;
}
:root:active-view-transition button {
  visibility: hidden;
}

In the reference

The example above is MDN's example for :active-view-transition.

Browser support

First browser version supporting the whole Active view transition feature
Chrome 125
Edge 125
Firefox 147
Safari 18.2
Chrome Android 125
Safari iOS 18.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

rcap unit

Newly available since January 2026 Units

web-features The rcap CSS length unit is a font-relative length equal to the value of the cap unit on the root element. Cap-height is approximately equal to the height of a capital Latin letter.

Live preview Example from MDN
html {
  font-family: sans-serif;
  font-weight: bold;
  box-sizing: border-box;
}

.outer {
  width: 100%;
  height: 50px;
  background-color: #eeeeee;
  position: relative;
}

.inner {
  height: 50px;
  background-color: #999999;
  box-shadow:
    inset 3px 3px 5px rgb(255 255 255 / 50%),
    inset -3px -3px 5px rgb(0 0 0 / 50%);
}

.result {
  height: 20px;
  box-shadow:
    inset 3px 3px 5px rgb(255 255 255 / 50%),
    inset -3px -3px 5px rgb(0 0 0 / 50%);
  background-color: orange;
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.result code {
  position: absolute;
  margin-left: 20px;
}

.results {
  margin-top: 10px;
}

.input-container {
  position: absolute;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 50px;
}

label {
  margin: 0 10px 0 20px;
}

In the reference

The example above is MDN's example for <length>.

Browser support

First browser version supporting the whole rcap unit feature
Chrome 118
Edge 118
Firefox 147
Safari 17.2
Chrome Android 118
Safari iOS 17.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

rch unit

Newly available since January 2026 Units

web-features The rch CSS length unit is a font-relative length equal to the value of the ch unit on the root element. ch length is based on the width of the zero (0) character.

Live preview Example from MDN
html {
  font-family: sans-serif;
  font-weight: bold;
  box-sizing: border-box;
}

.outer {
  width: 100%;
  height: 50px;
  background-color: #eeeeee;
  position: relative;
}

.inner {
  height: 50px;
  background-color: #999999;
  box-shadow:
    inset 3px 3px 5px rgb(255 255 255 / 50%),
    inset -3px -3px 5px rgb(0 0 0 / 50%);
}

.result {
  height: 20px;
  box-shadow:
    inset 3px 3px 5px rgb(255 255 255 / 50%),
    inset -3px -3px 5px rgb(0 0 0 / 50%);
  background-color: orange;
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.result code {
  position: absolute;
  margin-left: 20px;
}

.results {
  margin-top: 10px;
}

.input-container {
  position: absolute;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 50px;
}

label {
  margin: 0 10px 0 20px;
}

In the reference

The example above is MDN's example for <length>.

Browser support

First browser version supporting the whole rch unit feature
Chrome 111
Edge 111
Firefox 147
Safari 17.2
Chrome Android 111
Safari iOS 17.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

rex unit

Newly available since January 2026 Units

web-features The rex CSS length unit is a font-relative length that is equal to the x-height of the root element.

Live preview Example from MDN
html {
  font-family: sans-serif;
  font-weight: bold;
  box-sizing: border-box;
}

.outer {
  width: 100%;
  height: 50px;
  background-color: #eeeeee;
  position: relative;
}

.inner {
  height: 50px;
  background-color: #999999;
  box-shadow:
    inset 3px 3px 5px rgb(255 255 255 / 50%),
    inset -3px -3px 5px rgb(0 0 0 / 50%);
}

.result {
  height: 20px;
  box-shadow:
    inset 3px 3px 5px rgb(255 255 255 / 50%),
    inset -3px -3px 5px rgb(0 0 0 / 50%);
  background-color: orange;
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.result code {
  position: absolute;
  margin-left: 20px;
}

.results {
  margin-top: 10px;
}

.input-container {
  position: absolute;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 50px;
}

label {
  margin: 0 10px 0 20px;
}

In the reference

The example above is MDN's example for <length>.

Browser support

First browser version supporting the whole rex unit feature
Chrome 111
Edge 111
Firefox 147
Safari 17.2
Chrome Android 111
Safari iOS 17.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

ric unit

Newly available since January 2026 Units

web-features The ric CSS length unit, or root international character, is a font-relative length equal to the width of CJK character relative to the root element.

Live preview Example from MDN
html {
  font-family: sans-serif;
  font-weight: bold;
  box-sizing: border-box;
}

.outer {
  width: 100%;
  height: 50px;
  background-color: #eeeeee;
  position: relative;
}

.inner {
  height: 50px;
  background-color: #999999;
  box-shadow:
    inset 3px 3px 5px rgb(255 255 255 / 50%),
    inset -3px -3px 5px rgb(0 0 0 / 50%);
}

.result {
  height: 20px;
  box-shadow:
    inset 3px 3px 5px rgb(255 255 255 / 50%),
    inset -3px -3px 5px rgb(0 0 0 / 50%);
  background-color: orange;
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.result code {
  position: absolute;
  margin-left: 20px;
}

.results {
  margin-top: 10px;
}

.input-container {
  position: absolute;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 50px;
}

label {
  margin: 0 10px 0 20px;
}

In the reference

The example above is MDN's example for <length>.

Browser support

First browser version supporting the whole ric unit feature
Chrome 111
Edge 111
Firefox 147
Safari 17.2
Chrome Android 111
Safari iOS 17.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

scrollbar-color

Newly available since December 2025 Scrolling

web-features The scrollbar-color CSS property sets the color of the scrollbar track and thumb.

scrollbar-color Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.sc { max-width: 720px; margin: 0 auto; }
.sc-title { margin: 0 0 4px; font-size: 1.2rem; }
.sc-hint { margin: 0 0 14px; color: #44403c; font-size: 0.9rem; }

.sc .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fef3c7; color: #78350f; }
@supports not (scrollbar-color: red blue) { .sc .unsupported { display: block; } }

.sc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }

.sc-box {
  height: 220px;
  overflow-y: scroll;
  padding: 4px 14px;
  border-radius: 14px;
  background: var(--bg);
  color: var(--fg);
  /* First color: thumb. Second color: track. */
  scrollbar-color: var(--thumb) var(--track);
  transition: scrollbar-color 0.4s;
}
.sc-box:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.sc-box h2 { margin: 10px 0 8px; font-size: 1.1rem; }
.sc-box p { margin: 0 0 40px; }

.sc-grape { --bg: #f5f3ff; --fg: #2e1065; --thumb: #7c3aed; --track: #ddd6fe; }
.sc-grape:hover { --thumb: #db2777; --track: #fce7f3; }
.sc-mint { --bg: #ecfdf5; --fg: #064e3b; --thumb: #047857; --track: #a7f3d0; }
.sc-mint:hover { --thumb: #0369a1; --track: #bae6fd; }
.sc-night { --bg: #111827; --fg: #f9fafb; --thumb: #f59e0b; --track: #374151; }
.sc-night:hover { --thumb: #34d399; --track: #064e3b; }

@media (prefers-reduced-motion: reduce) {
  .sc-box { transition: none; }
}

Browser support

First browser version supporting the whole scrollbar-color feature
Chrome 121
Edge 121
Firefox 64
Safari 26.2
Chrome Android 121
Safari iOS 26.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Spelling and grammar text decorations

Newly available since December 2025 Text

web-features The text-decoration-line: spelling-error and text-decoration-line: grammar-error CSS declarations apply the browser's marking for spelling and grammatical mistakes. This is typically a wavy underline in red or green.

Live preview Example from MDN
p {
  font: 1.5em sans-serif;
}

In the reference

The example above is MDN's example for text-decoration-line.

Browser support

First browser version supporting the whole Spelling and grammar text decorations feature
Chrome 121
Edge 121
Firefox 137
Safari 26.2
Chrome Android 121
Safari iOS 26.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

View transitions

Newly available since October 2025 View transitions

web-features View transitions allow you to create animated visual transitions between different states of a document.

View transitions Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-vt, .demo-vt * { box-sizing: border-box; }
.demo-vt { max-width: 860px; margin: 0 auto; }
.demo-vt .hint { margin: 0 0 12px; }
.demo-vt .unsupported { display: none; margin: 0 0 12px; padding: 10px 12px; border: 2px dashed #b45309; border-radius: 8px; background: #fffbeb; }
@supports not (view-transition-name: a) {
  .demo-vt .unsupported { display: block; }
}

.demo-vt .controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.demo-vt .controls button { font: inherit; font-weight: 600; padding: 8px 16px; border: 2px solid #1b1b1b; border-radius: 8px; background: #fff; color: #1b1b1b; cursor: pointer; }
.demo-vt .controls button:hover { background: #eef2ff; }
.demo-vt button:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

.demo-vt .cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.demo-vt .cards.list { grid-template-columns: 1fr; }
.demo-vt .cards li { height: 84px; border-radius: 14px; overflow: hidden; }
.demo-vt .cards.list li { height: 52px; }
.demo-vt .cards li button { display: block; width: 100%; height: 100%; border: 0; color: #fff; font: inherit; font-size: 1.1rem; font-weight: 700; cursor: pointer; background: inherit; text-align: center; }
.demo-vt .cards.list li button { text-align: left; padding-inline: 20px; }

.demo-vt #card-a { background: #b45309; view-transition-name: card-a; }
.demo-vt #card-b { background: #be185d; view-transition-name: card-b; }
.demo-vt #card-c { background: #1d4ed8; view-transition-name: card-c; }
.demo-vt #card-d { background: #0e7490; view-transition-name: card-d; }
.demo-vt #card-e { background: #b91c1c; view-transition-name: card-e; }
.demo-vt #card-f { background: #15803d; view-transition-name: card-f; }

/* The page itself does not animate: only the named cards fly to their new place. */
::view-transition-old(root),
::view-transition-new(root) { animation: none; }

/* Every card gets its own group. It moves and resizes from the old box to the new one. */
::view-transition-group(*) { animation-duration: 0.55s; animation-timing-function: cubic-bezier(0.3, 1.2, 0.5, 1); }

/* The image pair holds the old and the new snapshot of a card, cross-faded while it moves. */
::view-transition-image-pair(*) { isolation: isolate; }
::view-transition-old(*) { animation-duration: 0.25s; }
::view-transition-new(*) { animation-duration: 0.55s; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: 0.01s; }
}

Browser support

First browser version supporting the whole View transitions feature
Chrome 111
Edge 111
Firefox 144
Safari 18
Chrome Android 111
Safari iOS 18

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

view-transition-class

Newly available since October 2025 View transitions

web-features The view-transition-class CSS property sets a name that can be used to apply styles to multiple named view transition pseudo-elements.

Live preview Example from MDN
/* Each element must have a unique view-transition-name */
#card1 {
  view-transition-name: card-1;
}

#card2 {
  view-transition-name: card-2;
}

#card3 {
  view-transition-name: card-3;
}

/* But they can all share the same view-transition-class */
.card {
  view-transition-class: card;
}

/* This single rule applies to all three cards' transitions */
::view-transition-group(.card) {
  animation-duration: 0.5s;
  animation-timing-function: ease-in-out;
}

In the reference

The example above is MDN's example for view-transition-class.

Browser support

First browser version supporting the whole view-transition-class feature
Chrome 125
Edge 125
Firefox 144
Safari 18.2
Chrome Android 125
Safari iOS 18.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

::details-content

Newly available since September 2025 Selectors

web-features The ::details-content pseudo-element selects the expandable content of a <details> element, excluding the <summary>.

::details-content Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-details { max-inline-size: 560px; interpolate-size: allow-keywords; }
.demo-details .unsupported { display: none; padding: 10px 14px; border-radius: 8px; background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
@supports not selector(::details-content) { .demo-details .unsupported { display: block; } }
.demo-details .hint { margin: 0 0 12px; color: #52525b; }

.demo-details details { margin-block-end: 8px; border: 1px solid #d4d4d8; border-radius: 12px; background: #fff; }
.demo-details details[open] { border-color: #4f46e5; }

.demo-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  border-radius: 12px;
}
.demo-details summary::-webkit-details-marker { display: none; }
.demo-details summary::after { content: ""; inline-size: 0.6em; block-size: 0.6em; border: solid #4f46e5; border-width: 0 3px 3px 0; rotate: 45deg; transition: rotate 0.3s; }
.demo-details details[open] summary::after { rotate: 225deg; }
.demo-details summary:focus-visible { outline: 3px solid #1b1b1b; outline-offset: 2px; }

/* The hidden part of <details>: height animates between 0 and auto. */
.demo-details details::details-content {
  block-size: 0;
  overflow: clip;
  opacity: 0;
  transition: block-size 0.35s ease, opacity 0.35s ease, content-visibility 0.35s allow-discrete;
}
.demo-details details[open]::details-content { block-size: auto; opacity: 1; }

.demo-details details p { margin: 0; padding: 0 16px 14px; }

@media (prefers-reduced-motion: reduce) {
  .demo-details details::details-content, .demo-details summary::after { transition: none; }
}

Browser support

First browser version supporting the whole ::details-content feature
Chrome 131
Edge 131
Firefox 143
Safari 18.4
Chrome Android 131
Safari iOS 18.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

content-visibility

Newly available since September 2025 CSS

web-features The content-visibility CSS property delays rendering an element, including layout and painting, until it is needed.

content-visibility Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.cv { max-width: 680px; margin: 0 auto; }
.cv-title { margin: 0 0 10px; font-size: 1.2rem; }

.cv .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fef3c7; color: #78350f; }
@supports not (content-visibility: auto) { .cv .unsupported { display: block; } }

.cv-bar { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-bottom: 10px; }
.cv-toggle { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border: 2px solid #166534; border-radius: 99px; font-weight: 600; cursor: pointer; }
.cv-toggle:has(:focus-visible) { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.cv-toggle input { accent-color: #166534; }
.cv-status { margin: 0; font-size: 0.9rem; color: #292524; }
.cv-status strong { font-variant-numeric: tabular-nums; }

.cv-scroller { height: 340px; overflow-y: auto; padding: 10px; border: 2px solid #bbf7d0; border-radius: 14px; background: #f0fdf4; }
.cv-scroller:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

.cv-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }

.cv-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 12px;
  row-gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgb(22 101 52 / 0.15);
  /* Skip layout and paint while off screen. The size is a placeholder until the card is first rendered. */
  content-visibility: auto;
  contain-intrinsic-size: auto 63px;
}
.cv:has(#cv-toggle:not(:checked)) .cv-card { content-visibility: visible; }

.cv-n { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #166534; color: #fff; font-weight: 700; font-size: 0.85rem; }
.cv-card h2 { margin: 0; font-size: 0.95rem; }
.cv-card p { margin: 0; color: #44403c; font-size: 0.85rem; }
.cv-tiles { grid-column: 2; display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; height: 14px; }
.cv-tiles i { border-radius: 2px; background: linear-gradient(135deg, #22c55e, #0ea5e9); box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); }

Browser support

First browser version supporting the whole content-visibility feature
Chrome 108
Edge 108
Firefox 130
Safari 26
Chrome Android 108
Safari iOS 26

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

abs() and sign()

Newly available since June 2025 CSS

web-features The abs() and sign() CSS functions compute the absolute value or the sign of the input.

abs() and sign() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-as, .demo-as * { box-sizing: border-box; }
.demo-as { --v: 60; max-width: 860px; margin: 0 auto; }
.demo-as .hint { margin: 0 0 12px; }
.demo-as .unsupported { display: none; margin: 0 0 12px; padding: 10px 12px; border: 2px dashed #b45309; border-radius: 8px; background: #fffbeb; }
@supports not (width: abs(-1px)) {
  .demo-as .unsupported { display: block; }
}

.demo-as .controls { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-weight: 600; }
.demo-as .controls input { flex: 1; max-width: 420px; accent-color: #1d4ed8; }
.demo-as .controls input:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }
.demo-as output { min-width: 4ch; font-variant-numeric: tabular-nums; }

.demo-as .board { padding: 18px; border-radius: 12px; background: #f1f5f9; }

/* sign() is -1, 0 or 1: as a scale it flips the arrow, and at 0 it makes it vanish. */
.demo-as .arrow {
  width: 120px;
  height: 56px;
  margin: 0 auto 18px;
  clip-path: polygon(0 28%, 58% 28%, 58% 0, 100% 50%, 58% 100%, 58% 72%, 0 72%);
  scale: sign(var(--v)) 1;
  /* The hue also follows the sign: orange left, green right. */
  background: hsl(calc(92 + sign(var(--v)) * 68) 70% 38%);
}

/* The bar starts at the middle. abs() is its length, sign() decides which side it grows to. */
.demo-as .track { position: relative; height: 30px; border-radius: 15px; background: #e2e8f0; overflow: hidden; }
.demo-as .track::after { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 100%; background: #1b1b1b; }
.demo-as .bar {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: calc(abs(var(--v)) * 0.5%);
  translate: calc(min(sign(var(--v)), 0) * 100%) 0;
  background: hsl(calc(92 + sign(var(--v)) * 68) 70% 38%);
}

.demo-as .read { margin: 14px 0 0; text-align: center; }

@media (prefers-reduced-motion: no-preference) {
  .demo-as .arrow { transition: scale 0.25s; }
}

Browser support

First browser version supporting the whole abs() and sign() feature
Chrome 138
Edge 138
Firefox 118
Safari 15.4
Chrome Android 138
Safari iOS 15.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Popover

Newly available since January 2025 HTML

web-features The popover HTML attribute creates an overlay to display content on top of other page content. Popovers can be shown declaratively using HTML, or using the showPopover() method.

Popover Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

/* The frame height follows the page, so reserve room for the centered sheet. */
.demo-pop { min-height: 340px; }
.demo-pop .unsupported { display: none; padding: 10px 14px; border-radius: 8px; background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
@supports not selector(:popover-open) { .demo-pop .unsupported { display: block; } }

.demo-pop .hint { margin: 0 0 14px; color: #52525b; }
.demo-pop .row { display: flex; flex-wrap: wrap; gap: 10px; }
.demo-pop .btn {
  padding: 9px 16px;
  font: inherit;
  color: #fff;
  background: #4f46e5;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.demo-pop .btn.alt { background: #0f766e; }
.demo-pop .btn:focus-visible, .demo-pop .item:focus-visible { outline: 3px solid #1b1b1b; outline-offset: 2px; }

/* All three are top-layer popovers: no z-index, no JavaScript. */
.demo-pop [popover] {
  color: #1b1b1b;
  background: #fff;
  border: 1px solid #d4d4d8;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.25);
}

/* Menu: tied to its button with anchor positioning. */
.demo-pop #menu-btn { anchor-name: --menu-btn; }
.demo-pop #menu {
  position-anchor: --menu-btn;
  position-area: bottom span-right;
  margin: 6px 0 0;
  padding: 6px;
  min-inline-size: 160px;
}
.demo-pop #menu:popover-open { display: grid; }
.demo-pop .item { padding: 8px 12px; font: inherit; text-align: start; color: inherit; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.demo-pop .item:hover { background: #eef2ff; }

/* Sheet: centered, with a styled ::backdrop. */
.demo-pop #sheet { box-sizing: border-box; inline-size: min(320px, 90vw); padding: 20px 22px; }
.demo-pop #sheet h2 { margin: 0 0 6px; font-size: 1.2rem; }
.demo-pop #sheet p { margin: 0 0 14px; }
.demo-pop #sheet::backdrop { background: rgb(30 27 75 / 0.45); backdrop-filter: blur(3px); }

/* Note: popover="manual" never light-dismisses. */
.demo-pop #note {
  inset: auto 16px 16px auto;
  margin: 0;
  padding: 14px 16px;
  max-inline-size: 240px;
  border-color: #0f766e;
}
.demo-pop #note p { margin: 0 0 10px; }

/* Enter and exit animation, driven by :popover-open and @starting-style. */
.demo-pop #menu, .demo-pop #sheet, .demo-pop #note {
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transition: opacity 0.2s, transform 0.2s, overlay 0.2s allow-discrete, display 0.2s allow-discrete;
}
.demo-pop #menu:popover-open, .demo-pop #sheet:popover-open, .demo-pop #note:popover-open { opacity: 1; transform: none; }
.demo-pop #sheet::backdrop { opacity: 0; transition: opacity 0.2s, overlay 0.2s allow-discrete, display 0.2s allow-discrete; }
.demo-pop #sheet:popover-open::backdrop { opacity: 1; }
@starting-style {
  .demo-pop #menu:popover-open, .demo-pop #sheet:popover-open, .demo-pop #note:popover-open { opacity: 0; transform: translateY(10px) scale(0.97); }
  .demo-pop #sheet:popover-open::backdrop { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-pop #menu, .demo-pop #sheet, .demo-pop #note, .demo-pop #sheet::backdrop { transition: none; }
}

Browser support

First browser version supporting the whole Popover feature
Chrome 116
Edge 116
Firefox 125
Safari 17
Chrome Android 116
Safari iOS 18.3

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

::target-text

Newly available since December 2024 Text fragments

web-features The ::target-text pseudo-element allows you to style text highlighted by a URL text fragment such as #:~:text=snippet.

::target-text Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-target {
  --hl-bg: #fde047;
  --hl-fg: #1b1b1b;
  --hl-deco: none;
  max-width: 46rem;
  margin-inline: auto;
}
.demo-target:has(#hl-ink:checked) { --hl-bg: #312e81; --hl-fg: #fff; }
.demo-target:has(#hl-wave:checked) {
  --hl-bg: #fce7f3;
  --hl-fg: #9d174d;
  --hl-deco: underline wavy #db2777;
}

/* The text a "#:~:text=" link scrolled to. Highlight pseudos inherit, so custom properties work here. */
.demo-target ::target-text {
  background-color: var(--hl-bg);
  color: var(--hl-fg);
  text-decoration: var(--hl-deco);
}

.demo-target .controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.demo-target fieldset { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 4px 12px 8px; border: 1px solid #cbd5e1; border-radius: 10px; }
.demo-target legend { padding-inline: 4px; font-size: 0.85rem; color: #475569; }
.demo-target label { cursor: pointer; }
.demo-target input:focus-visible { outline: 3px solid #4f46e5; outline-offset: 2px; }

/* The address bar shows the fragment that the selected radio stands for. */
.demo-target { --frag: "slow%20tide"; }
.demo-target:has(#frag-2:checked) { --frag: "copper%20lanterns"; }
.demo-target:has(#frag-3:checked) { --frag: "last%20ferry"; }
.demo-target .address { margin: 0 0 10px; padding: 6px 12px; border-radius: 999px; background: #f1f5f9; font: 0.85rem ui-monospace, monospace; overflow-wrap: anywhere; }
.demo-target .bar::before { content: "https://example.com/harbour"; color: #64748b; }
.demo-target .bar::after { content: "#:~:text=" var(--frag); color: #3730a3; font-weight: 700; }

.demo-target .page { padding: 4px 16px 4px; border: 2px solid #cbd5e1; border-radius: 12px; background: #fafaf9; line-height: 1.6; }
.demo-target .page h2 { margin: 8px 0; font-size: 1.1rem; }
.demo-target .page p { margin: 0 0 10px; }

/* Stand-in for the real thing: only the selected phrase is painted. */
.demo-target .hit { background: none; color: inherit; transition: background-color 0.3s, color 0.3s; }
.demo-target:has(#frag-1:checked) .m1,
.demo-target:has(#frag-2:checked) .m2,
.demo-target:has(#frag-3:checked) .m3 {
  background-color: var(--hl-bg);
  color: var(--hl-fg);
  text-decoration: var(--hl-deco);
}
.demo-target .note { margin: 10px 0 0; color: #555; font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) { .demo-target .hit { transition: none; } }

.demo-target .unsupported { display: none; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #78350f; }
@supports not selector(::target-text) {
  .demo-target .unsupported { display: block; }
}

Browser support

First browser version supporting the whole ::target-text feature
Chrome 89
Edge 89
Firefox 131
Safari 18.2
Chrome Android 89
Safari iOS 18.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Page setup

Newly available since December 2024 Layout

web-features The @page CSS at-rule sets the page-specific dimensions and margins for content such as printed documents, ebooks, or slides.

Live preview Example from MDN
@page {
  size: landscape;
  margin: 2cm;
}

section {
  page-break-after: always;
  break-after: page;
}

@media print {
  button {
    display: none;
  }
}

body {
  font-family: "Helvetica", sans-serif;
  background-color: silver;
}

article {
  width: 100%;
}

section {
  display: grid;
  background-color: white;
  border-radius: 0.6rem;
  justify-items: center;
  padding: 1rem;
  width: 50%;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
  margin: 0 auto;
  margin-block-end: 1rem;
  border: 1px dashed;
}

In the reference

The example above is MDN's example for @page.

Browser support

First browser version supporting the whole Page setup feature
Chrome 15
Edge 79
Firefox 95
Safari 18.2
Chrome Android 18
Safari iOS 18.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

ruby-align

Newly available since December 2024 Ruby

web-features The ruby-align CSS property sets the spacing and alignment of ruby annotation text when it does not fill its available space.

Live preview Example from MDN
ruby {
  ruby-align: start;
}

In the reference

The example above is MDN's example for ruby-align.

Browser support

First browser version supporting the whole ruby-align feature
Chrome 128
Edge 128
Firefox 38
Safari 18.2
Chrome Android 128
Safari iOS 18.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

ruby-position

Newly available since December 2024 Ruby

web-features The ruby-position CSS property sets the position of a ruby annotation in relation to its base text. Annotations can display over, under, or interleaved with the base text.

Live preview Example from MDN
#example-element {
  font-size: 2em;
}

In the reference

The example above is MDN's example for ruby-position.

Browser support

First browser version supporting the whole ruby-position feature
Chrome 84
Edge 84
Firefox 38
Safari 18.2
Chrome Android 84
Safari iOS 18.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

scrollbar-gutter

Newly available since December 2024 Scrolling

web-features The scrollbar-gutter CSS property reserves space for the scrollbar, preventing unwanted layout changes as the scrollbar appears and disappears.

scrollbar-gutter Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.sg { max-width: 720px; margin: 0 auto; }
.sg-title { margin: 0 0 8px; font-size: 1.2rem; }
.sg-toggle { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border: 2px solid #1e40af; border-radius: 99px; font-weight: 600; cursor: pointer; }
.sg-toggle:has(:focus-visible) { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.sg-hint { margin: 8px 0 14px; color: #44403c; font-size: 0.9rem; }

.sg .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fef3c7; color: #78350f; }
@supports not (scrollbar-gutter: stable) { .sg .unsupported { display: block; } }

.sg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

.sg-box {
  height: 170px;
  overflow-y: auto;
  padding: 0 12px;
  border: 2px solid #94a3b8;
  border-radius: 14px;
  background: #f8fafc;
}
.sg-box:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.sg-box h2 { margin: 10px 0 8px; font-size: 0.95rem; }
.sg-box p { margin: 12px 0; font-size: 0.9rem; }

/* The property under test: reserve room for the scrollbar before it is needed. */
.sg-auto { scrollbar-gutter: auto; }
.sg-stable { scrollbar-gutter: stable; }
.sg-both { scrollbar-gutter: stable both-edges; }

.sg-ruler { padding: 8px 10px; border-radius: 8px; background: #2563eb; color: #fff; font-size: 0.85rem; font-weight: 600; }

.sg-more { display: none; }
.sg:has(.sg-toggle input:checked) .sg-more { display: block; }

Browser support

First browser version supporting the whole scrollbar-gutter feature
Chrome 94
Edge 94
Firefox 97
Safari 18.2
Chrome Android 94
Safari iOS 18.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

scrollbar-width

Newly available since December 2024 Scrolling

web-features The scrollbar-width CSS property sets the width of the scrollbar.

Live preview Example from MDN
.scroller {
  width: 300px;
  height: 100px;
  overflow-y: scroll;
  scrollbar-width: thin;
}

In the reference

The example above is MDN's example for scrollbar-width.

Browser support

First browser version supporting the whole scrollbar-width feature
Chrome 121
Edge 121
Firefox 64
Safari 18.2
Chrome Android 121
Safari iOS 18.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

text-wrap

Newly available since October 2024 Text wrap

web-features The text-wrap CSS property sets how lines break in text that overflows the container. It is a shorthand for text-wrap-style and text-wrap-mode.

text-wrap Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

Dashed chips belong to the same feature but this demo does not use them.

.demo-wrap { --accent: #4f46e5; max-width: 46rem; margin-inline: auto; }
.demo-wrap .hint { margin: 0 0 10px; color: #555; font-size: 0.9rem; }

/* The box is resizable: the three headings re-wrap as it changes width. */
.demo-wrap .stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  box-sizing: border-box;
  width: 21rem;
  min-width: 11rem;
  max-width: 100%;
  padding: 14px;
  overflow: hidden;
  resize: horizontal;
  border: 2px dashed #9ca3af;
  border-radius: 14px;
  background: #f8f8fc;
}
.demo-wrap .sample { padding: 10px 12px; background: #fff; border-radius: 10px; border-left: 5px solid var(--accent); }
.demo-wrap .sample h2 { margin: 0 0 4px; color: var(--accent); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.demo-wrap .title { margin: 0; font-size: 1.55rem; font-weight: 700; line-height: 1.2; }

.demo-wrap .title-wrap { text-wrap: wrap; }
.demo-wrap .title-balance { text-wrap: balance; }
/* text-wrap is a shorthand: this sets only the mode half. */
.demo-wrap .title-nowrap {
  text-wrap-mode: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-wrap .unsupported { display: none; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #78350f; }
@supports not (text-wrap: balance) {
  .demo-wrap .unsupported { display: block; }
}

Browser support

First browser version supporting the whole text-wrap feature
Chrome 130
Edge 130
Firefox 124
Safari 17.5
Chrome Android 130
Safari iOS 17.5

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

backdrop-filter

Newly available since September 2024 CSS

web-features The backdrop-filter CSS property applies graphical effects such as blurring or color shifting to the area behind an element.

backdrop-filter Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-bf { --blur: 14px; --sat: 160%; max-width: 860px; margin: 0 auto; }
.demo-bf .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not (backdrop-filter: blur(1px)) {
  .demo-bf .unsupported { display: block; }
}
.demo-bf :focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

.demo-bf .scene {
  position: relative; display: grid; place-items: center; height: 320px; overflow: hidden; border-radius: 16px;
  background: linear-gradient(135deg, #ff5f6d, #ffc371 40%, #3ad8c6 70%, #5b5bff);
}
.demo-bf .blob { position: absolute; border-radius: 50%; animation: bf-drift 9s ease-in-out infinite alternate; }
.demo-bf .b1 { width: 170px; height: 170px; left: 8%;  top: 8%;    background: #7c3aed; }
.demo-bf .b2 { width: 130px; height: 130px; right: 10%; bottom: 8%; background: #ffe600; animation-delay: -3s; }
.demo-bf .b3 { width: 90px;  height: 90px;  right: 28%; top: 6%;    background: #ff2d95; animation-delay: -6s; }
@keyframes bf-drift { to { transform: translate(60px, 40px) scale(1.15); } }

.demo-bf .word {
  position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 0 12px;
  font: 900 clamp(2rem, 9vw, 5rem) / 1 system-ui, sans-serif; text-align: center; color: #1b1b3a; opacity: 0.85;
}

/* The glass: a translucent fill plus a filter on whatever is painted behind it. */
.demo-bf .glass {
  position: relative; box-sizing: border-box; width: min(360px, calc(100% - 32px)); padding: 18px 20px; border-radius: 20px;
  border: 1px solid rgb(255 255 255 / 0.6); background: rgb(255 255 255 / 0.28);
  backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  box-shadow: 0 10px 30px rgb(0 0 40 / 0.25); color: #0b0b2a;
}
.demo-bf .glass h2 { margin: 0 0 6px; font-size: 1.25rem; }
.demo-bf .glass p { margin: 0; font-size: 14px; line-height: 1.45; }

.demo-bf .controls { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 12px; }
.demo-bf .ctl { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.demo-bf output { min-width: 4ch; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .demo-bf .blob { animation: none; }
}

Browser support

First browser version supporting the whole backdrop-filter feature
Chrome 76
Edge 79
Firefox 103
Safari 18
Chrome Android 76
Safari iOS 18

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Relative colors

Newly available since September 2024 CSS

web-features The from keyword for color functions (color(), hsl(), oklch(), etc.) creates a new color based on a given color by modifying the values of the input color. Also known as relative color syntax (RCS).

Relative colors Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

Dashed chips belong to the same feature but this demo does not use them.

.demo-rel { --brand: #7c3aed; --turn: 0; max-width: 860px; margin: 0 auto; }
.demo-rel .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not (color: oklch(from red l c h)) {
  .demo-rel .unsupported { display: block; }
}

.demo-rel .controls { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 8px; }
.demo-rel .controls label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.demo-rel input[type="color"] { width: 48px; height: 32px; padding: 0; border: 1px solid #888; border-radius: 6px; }
.demo-rel :focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

.demo-rel .label { margin: 14px 0 6px; font-size: 13px; font-weight: 600; }
.demo-rel .row { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.demo-rel .row li {
  flex: 1; min-width: 0; height: 60px; padding: 6px; box-sizing: border-box;
  display: flex; align-items: flex-end; border-radius: 8px; font-size: 11px;
  /* Relative color: keep the brand's chroma and hue, only change lightness. */
  --bg: oklch(from var(--brand) var(--l) c h);
  background: var(--bg);
  /* Text color derived from the swatch itself: dark when l > 0.65, light otherwise. */
  color: oklch(from var(--bg) calc((l - 0.65) * -1000) 0 h);
}
.demo-rel .hues li {
  /* Rotate the hue around the wheel, same lightness and chroma. */
  --bg: oklch(from var(--brand) l c calc(h + var(--k) + var(--turn)));
}

.demo-rel .card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  margin-top: 16px; padding: 16px; border-radius: 12px; font-size: 14px;
  background: oklch(from var(--brand) 0.96 0.03 h);
  border: 2px solid oklch(from var(--brand) 0.8 calc(c * 0.5) h);
  color: oklch(from var(--brand) 0.3 calc(c * 0.6) h);
}
.demo-rel .card button {
  padding: 8px 18px; border: 0; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--brand);
  color: oklch(from var(--brand) calc((l - 0.65) * -1000) 0 h);
}
.demo-rel .card button:hover { background: oklch(from var(--brand) calc(l - 0.08) c h); }

Browser support

First browser version supporting the whole Relative colors feature
Chrome 125
Edge 125
Firefox 128
Safari 18
Chrome Android 125
Safari iOS 18

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

@starting-style

Newly available since August 2024 CSS

web-features The @starting-style CSS at-rule sets the starting values for properties that are transitioning when the target element's style is first updated.

@starting-style Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-start { min-height: 380px; max-width: 52rem; margin: 0 auto; }

.demo-start .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fef3c7; color: #78350f; }
/* @starting-style shipped in the same browsers as transition-behavior: allow-discrete. */
@supports not (transition-behavior: allow-discrete) {
  .demo-start .unsupported { display: block; }
}

.demo-start .bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.demo-start button { font: inherit; font-weight: 600; padding: 8px 18px; border: 0; border-radius: 999px; background: #4f46e5; color: #fff; cursor: pointer; }
.demo-start button:hover { background: #4338ca; }
.demo-start button.ghost { background: #eef2ff; color: #3730a3; }
.demo-start button.ghost:hover { background: #e0e7ff; }
.demo-start button:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 2px; }
.demo-start button:disabled { opacity: 0.5; cursor: not-allowed; }

.demo-start .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }

.demo-start .card {
  display: grid;
  place-items: center;
  height: 84px;
  border-radius: 14px;
  background: hsl(var(--hue) 75% 45%);
  color: #fff;
  font-weight: 700;
  transition: opacity 0.5s, translate 0.5s, scale 0.5s;

  /* Where a freshly rendered element starts, before it moves to the values above. */
  @starting-style {
    opacity: 0;
    translate: 0 24px;
    scale: 0.8;
  }
}

.demo-start dialog {
  box-sizing: border-box;
  width: min(22rem, calc(100% - 32px));
  padding: 20px 22px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgb(15 23 42 / 0.35);
  opacity: 0;
  scale: 0.9;
  translate: 0 20px;
  /* The exit needs display and overlay to wait for the transition. */
  transition: opacity 0.35s, scale 0.35s, translate 0.35s, overlay 0.35s allow-discrete, display 0.35s allow-discrete;
}
.demo-start dialog h2 { margin: 0 0 8px; font-size: 1.15rem; }
.demo-start dialog p { margin: 0 0 16px; color: #334155; }
.demo-start dialog[open] {
  opacity: 1;
  scale: 1;
  translate: 0 0;
}
@starting-style {
  .demo-start dialog[open] {
    opacity: 0;
    scale: 0.9;
    translate: 0 20px;
  }
}

.demo-start dialog::backdrop {
  background-color: rgb(15 23 42 / 0);
  transition: background-color 0.35s, overlay 0.35s allow-discrete, display 0.35s allow-discrete;
}
.demo-start dialog[open]::backdrop { background-color: rgb(15 23 42 / 0.55); }
@starting-style {
  .demo-start dialog[open]::backdrop { background-color: rgb(15 23 42 / 0); }
}

@media (prefers-reduced-motion: reduce) {
  .demo-start .card,
  .demo-start dialog,
  .demo-start dialog::backdrop { transition-duration: 0.01s; }
}

Browser support

First browser version supporting the whole @starting-style feature
Chrome 117
Edge 117
Firefox 129
Safari 17.5
Chrome Android 117
Safari iOS 17.5

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

transition-behavior

Newly available since August 2024 Transitions (CSS)

web-features The transition-behavior: allow-discrete CSS declaration allows transitions for properties whose animation behavior is discrete. Such properties can't be interpolated and swap from their start value to the end value at 50%.

transition-behavior Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-behavior { max-width: 52rem; margin: 0 auto; }

.demo-behavior .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fef3c7; color: #78350f; }
@supports not (transition-behavior: allow-discrete) {
  .demo-behavior .unsupported { display: block; }
}

.demo-behavior .switch { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 8px 16px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-weight: 600; cursor: pointer; }
.demo-behavior .switch:has(:focus-visible) { outline: 3px solid #a5b4fc; outline-offset: 2px; }
.demo-behavior .switch input { width: 18px; height: 18px; accent-color: #4f46e5; }

.demo-behavior .pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.demo-behavior .slot { min-height: 170px; padding: 8px; border: 2px dashed #cbd5e1; border-radius: 16px; }

.demo-behavior .card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 150px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  /* display is discrete: with the default behavior it flips at the very first frame. */
  transition: opacity 0.8s, scale 0.8s, display 0.8s;

  @starting-style {
    opacity: 0;
    scale: 0.85;
  }
}
.demo-behavior .card strong { font-size: 1.1rem; }
.demo-behavior .card.smart { background: linear-gradient(135deg, #059669, #0ea5e9); transition-behavior: allow-discrete; }

.demo-behavior:has(#hide-cards:checked) .card {
  opacity: 0;
  scale: 0.85;
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .demo-behavior .card { transition-duration: 0.01s; }
}

Browser support

First browser version supporting the whole transition-behavior feature
Chrome 117
Edge 117
Firefox 129
Safari 17.4
Chrome Android 117
Safari iOS 17.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

font-size-adjust

Newly available since July 2024 Fonts

web-features The font-size-adjust CSS property preserves apparent text size, regardless of the font used, by scaling fonts to the same size with respect to a specific metric, such as x-height. This can help make fallback fonts look the same size.

font-size-adjust Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

Dashed chips belong to the same feature but this demo does not use them.

.demo-fsa {
  --adjust: none;
  --bar: 1ex;
  max-width: 46rem;
  margin-inline: auto;
}
.demo-fsa:has(#m-ex:checked) { --adjust: ex-height 0.545; }
.demo-fsa:has(#m-cap:checked) { --adjust: cap-height 0.73; --bar: 1cap; }

.demo-fsa .modes { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 10px; padding: 4px 12px 8px; border: 1px solid #cbd5e1; border-radius: 10px; }
.demo-fsa .modes legend { padding-inline: 4px; font: 0.85rem ui-monospace, monospace; color: #475569; }
.demo-fsa .modes label { cursor: pointer; }
.demo-fsa input:focus-visible { outline: 3px solid #4f46e5; outline-offset: 2px; }
.demo-fsa .hint { margin: 0 0 10px; color: #555; font-size: 0.9rem; }

.demo-fsa .stage { display: grid; gap: 12px; }
.demo-fsa .row { padding: 8px 16px 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.demo-fsa .label { margin: 0; color: #64748b; font-size: 0.8rem; }

/* Same font-size on both lines. font-size-adjust rescales each font so the chosen metric matches. */
.demo-fsa .line {
  margin: 0;
  font-size: 40px;
  line-height: 1.3;
  font-size-adjust: var(--adjust);
}
.demo-fsa .sans .line { font-family: Verdana, "DejaVu Sans", sans-serif; }
.demo-fsa .serif .line { font-family: "Times New Roman", "Liberation Serif", Times, serif; }

/* An empty inline box sits on the baseline, so its height is a ruler for the unit. */
.demo-fsa .bar { display: inline-block; width: 0.5rem; height: var(--bar); margin-right: 0.5rem; border-radius: 2px; background: #4f46e5; }
.demo-fsa .serif .bar { background: #db2777; }

.demo-fsa .unsupported { display: none; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #78350f; }
@supports not (font-size-adjust: 0.5) {
  .demo-fsa .unsupported { display: block; }
}

Browser support

First browser version supporting the whole font-size-adjust feature
Chrome 127
Edge 127
Firefox 118
Safari 17
Chrome Android 127
Safari iOS 17

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Alt text for generated content

Newly available since July 2024 CSS

web-features The / notation in content CSS property values adds alternative text to generated content. For example, the content: url('upvote-icon.svg') / 'Upvote' declaration adds accessible 'Upvote' text to the SVG icon. Also known as alternate text.

Live preview Example from MDN
.topic-games::before {
  content: "🎮 " / "games";
}

.topic-weather::before {
  content: "⛅ " / "cloudy";
}

.topic-hot::before {
  content: url("https://developer.mozilla.org/shared-assets/images/examples/fire.png") / "On fire";
  margin-right: 6px;
}

In the reference

The example above is MDN's example for content.

Browser support

First browser version supporting the whole Alt text for generated content feature
Chrome 77
Edge 79
Firefox 128
Safari 17.4
Chrome Android 77
Safari iOS 17.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Registered custom properties

Newly available since July 2024

web-features The CSS.registerProperty() static method and the @property CSS at-rule register custom properties for which types and behaviors can be defined.

Registered custom properties Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

/* @property gives a custom property a type, so the browser can interpolate it. */
@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@property --count {
  syntax: "<integer>";
  inherits: false;
  initial-value: 0;
}

/* Support probe: --supported is never set, so it only reads 1 where @property registered its initial value.
   at-rule(@property) is not an option: browsers without at-rule() would drop the whole @supports block. */
@property --supported {
  syntax: "<integer>";
  inherits: true;
  initial-value: 1;
}

.demo-prop, .demo-prop * { box-sizing: border-box; }
.demo-prop { max-width: 860px; margin: 0 auto; --off: calc(1 - var(--supported, 0)); }
.demo-prop .hint { margin: 0 0 14px; }
.demo-prop .unsupported {
  overflow: hidden; max-height: calc(var(--off) * 200px); margin: 0 0 calc(var(--off) * 14px);
  padding: calc(var(--off) * 10px) 12px; border: solid #b45309; border-width: calc(var(--off) * 2px); border-radius: 8px; background: #fffbeb;
}

.demo-prop .pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }

.demo-prop .ring {
  display: grid;
  padding: 5px;
  border-radius: 24px;
  animation: ring-spin 3s linear infinite;
}
.demo-prop .ring:focus-visible { outline: 3px solid #1b1b1b; outline-offset: 3px; }

.demo-prop .inner {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 24px 12px;
  border-radius: 19px;
  background: #fff;
  text-align: center;
}
.demo-prop .note { font-size: 0.85rem; color: #475569; }

.demo-prop .stat {
  font-size: 2.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.demo-prop .stat::after { content: counter(shown) "%"; }

/* Registered: --angle and --count are typed, so they animate and transition smoothly. */
.demo-prop .registered { background: conic-gradient(from var(--angle), #e11d48, #f59e0b, #16a34a, #2563eb, #e11d48); }
.demo-prop .registered .stat { counter-reset: shown var(--count); transition: --count 1.4s ease-out; }
.demo-prop .registered:hover .stat, .demo-prop .registered:focus-visible .stat { --count: 100; }
@keyframes ring-spin { to { --angle: 360deg; } }

/* Not registered: --turn and --total are plain text, so the browser can only flip them. */
.demo-prop .plain { background: conic-gradient(from var(--turn, 0deg), #e11d48, #f59e0b, #16a34a, #2563eb, #e11d48); animation-name: ring-spin-plain; }
.demo-prop .plain .stat { counter-reset: shown var(--total, 0); transition: --total 1.4s ease-out; }
.demo-prop .plain:hover .stat, .demo-prop .plain:focus-visible .stat { --total: 100; }
@keyframes ring-spin-plain { to { --turn: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  .demo-prop .ring { animation: none; }
  .demo-prop .stat { transition: none; }
}

Browser support

First browser version supporting the whole Registered custom properties feature
Chrome 85
Edge 85
Firefox 128
Safari 16.4
Chrome Android 85
Safari iOS 16.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Gradient interpolation

Newly available since June 2024 Gradients

web-features Gradient interpolation controls how the colors between gradient stops are calculated in CSS. For example, linear-gradient(to right in oklch longer hue, red, red); calculates in the oklch color space, with the hue going all the way around the hue circle from red back to red.

Gradient interpolation Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

Dashed chips belong to the same feature but this demo does not use them.

.demo-gi { --a: #ff2d55; --b: #00b4ff; --hue: shorter; max-width: 860px; margin: 0 auto; }
.demo-gi .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not (background: linear-gradient(in oklch, red, blue)) {
  .demo-gi .unsupported { display: block; }
}
.demo-gi :focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

.demo-gi .label { margin: 14px 0 6px; font-size: 13px; font-weight: 600; }

/* Default interpolation is premultiplied sRGB, which dulls the middle. Name a space with "in". */
.demo-gi .bar { display: flex; align-items: center; height: 40px; margin-bottom: 6px; padding: 0 12px; border-radius: 8px;
  font: 600 12px ui-monospace, monospace; color: white; text-shadow: 0 1px 2px rgb(0 0 0 / 0.7); }
.demo-gi .srgb  { background: linear-gradient(to right in srgb,  #0057ff, #ffd400); }
.demo-gi .oklab { background: linear-gradient(to right in oklab, #0057ff, #ffd400); }
.demo-gi .oklch { background: linear-gradient(to right in oklch, #0057ff, #ffd400); }

.demo-gi .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-bottom: 10px; font-size: 14px; }
.demo-gi .controls label { display: inline-flex; align-items: center; gap: 6px; }
.demo-gi input[type="color"] { width: 48px; height: 32px; padding: 0; border: 1px solid #888; border-radius: 6px; }
.demo-gi fieldset { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 4px 10px 6px; border: 1px solid #bbb; border-radius: 8px; }
.demo-gi legend { padding: 0 4px; font-size: 12px; }

.demo-gi:has(#h-longer:checked)     { --hue: longer; }
.demo-gi:has(#h-increasing:checked) { --hue: increasing; }
.demo-gi:has(#h-decreasing:checked) { --hue: decreasing; }

.demo-gi .stage { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.demo-gi .hero {
  flex: 1; min-width: 220px; height: 96px; border-radius: 12px;
  background: linear-gradient(to right in oklch var(--hue) hue, var(--a), var(--b));
}
/* Two equal hues with "longer" make one full turn: a hue wheel in a single declaration. */
.demo-gi .wheel {
  width: 96px; height: 96px; border-radius: 50%;
  background: conic-gradient(in oklch longer hue, oklch(0.75 0.16 0), oklch(0.75 0.16 0));
}

Browser support

First browser version supporting the whole Gradient interpolation feature
Chrome 111
Edge 111
Firefox 127
Safari 16.2
Chrome Android 111
Safari iOS 16.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

:state()

Newly available since May 2024 Custom elements

web-features The :state() CSS pseudo-class matches custom elements based on their custom state, set through the ElementInternals.states API.

:state() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-state { max-width: 40rem; margin: 0 auto; }
.demo-state .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not selector(:state(busy)) {
  .demo-state .unsupported { display: block; }
}

.demo-state .hint { margin: 0 0 14px; color: #5b5b66; }
.demo-state .tasks { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.demo-state li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 16px; border: 1px solid #d4d4dc; border-radius: 14px; background: #fafafc; }
.demo-state .readout { margin: 0; color: #5b5b66; font-size: 0.9rem; }
.demo-state code { padding: 2px 8px; border-radius: 6px; background: #ececf2; color: #1b1b1b; }

task-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 16rem;
  padding: 10px 18px;
  border: 2px solid #4338ca;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  color: #4338ca;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
task-button:focus-visible { outline: 3px solid #4338ca; outline-offset: 3px; }

/* The progress fill sits behind the label. */
task-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 0;
  background: #c7d2fe;
}
task-button::after { content: ""; margin-inline-start: auto; }

/* Custom states, set from JavaScript with ElementInternals.states. */
task-button:state(busy) { cursor: progress; }
task-button:state(busy)::before { animation: fill 1.4s linear forwards; }
task-button:state(busy)::after {
  width: 0.9rem;
  height: 0.9rem;
  border: 3px solid #4338ca;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

task-button:state(done) { border-color: #15803d; color: #14532d; }
task-button:state(done)::before { width: 100%; background: #bbf7d0; }
task-button:state(done)::after { content: "Done"; }

task-button:state(failed) { border-color: #b91c1c; color: #7f1d1d; }
task-button:state(failed)::before { width: 100%; background: #fecaca; }
task-button:state(failed)::after { content: "Failed, retry"; }

@keyframes fill { to { width: 100%; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  task-button:state(busy)::before { animation-duration: 0.01s; }
  task-button:state(busy)::after { animation: none; border-top-color: #4338ca; }
}

Browser support

First browser version supporting the whole :state() feature
Chrome 125
Edge 125
Firefox 126
Safari 17.4
Chrome Android 125
Safari iOS 17.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

round(), mod(), and rem()

Newly available since May 2024 CSS

web-features The round(), mod(), and rem() CSS functions compute rounded values and the remainder after division.

round(), mod(), and rem() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-rmr, .demo-rmr * { box-sizing: border-box; }
.demo-rmr { --x: 60px; --step: 50px; max-width: 860px; margin: 0 auto; }
.demo-rmr .hint { margin: 0 0 12px; }
.demo-rmr .unsupported { display: none; margin: 0 0 12px; padding: 10px 12px; border: 2px dashed #b45309; border-radius: 8px; background: #fffbeb; }
@supports not (width: round(10px, 4px)) {
  .demo-rmr .unsupported { display: block; }
}

.demo-rmr .controls { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-weight: 600; }
.demo-rmr .controls input { flex: 1; max-width: 420px; accent-color: #1d4ed8; }
.demo-rmr .controls input:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }
.demo-rmr output { min-width: 6ch; font-variant-numeric: tabular-nums; }

.demo-rmr .rulers { width: 300px; max-width: 100%; margin: 0 auto; }
.demo-rmr .name { margin: 8px 0 3px; font-size: 0.8rem; }
.demo-rmr .ruler {
  position: relative;
  height: 22px;
  /* The origin is the middle, three ticks in: ticks fall on every multiple of the step. */
  background:
    repeating-linear-gradient(90deg, #94a3b8 0 1px, transparent 1px var(--step)) 0 0 / 100% 100% no-repeat,
    linear-gradient(#e2e8f0, #e2e8f0) 0 50% / 100% 2px no-repeat;
}

.demo-rmr .dot { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #1d4ed8; }
.demo-rmr .dot.raw { background: #fff; box-shadow: inset 0 0 0 3px #1b1b1b; translate: var(--x); }
.demo-rmr .dot.nearest { translate: round(nearest, var(--x), var(--step)); }
.demo-rmr .dot.up { translate: round(up, var(--x), var(--step)); background: #be185d; }
.demo-rmr .dot.down { translate: round(down, var(--x), var(--step)); background: #b45309; }
.demo-rmr .dot.zero { translate: round(to-zero, var(--x), var(--step)); background: #15803d; }

/* A bar from the tick to the value: its width is the remainder, so its far end lands on x. */
.demo-rmr .span { position: absolute; left: 50%; top: 5px; height: 12px; border-radius: 3px; background: #7c3aed; }
.demo-rmr .span.mod { translate: round(down, var(--x), var(--step)); width: mod(var(--x), var(--step)); }
.demo-rmr .span.rem {
  /* rem() takes the sign of x, so for negative values the bar starts left of the tick. */
  translate: calc(round(to-zero, var(--x), var(--step)) + min(0px, rem(var(--x), var(--step))));
  width: abs(rem(var(--x), var(--step)));
  background: #0e7490;
}

@media (prefers-reduced-motion: no-preference) {
  .demo-rmr .dot, .demo-rmr .span { transition: translate 0.15s, width 0.15s; }
}

Browser support

First browser version supporting the whole round(), mod(), and rem() feature
Chrome 125
Edge 125
Firefox 118
Safari 17.2
Chrome Android 125
Safari iOS 17.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

zoom

Newly available since May 2024

web-features The zoom CSS property scales the size of an element. Unlike the transform property, a zoomed element affects page layout.

zoom Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-zoom { --z: 1; display: grid; gap: 12px; }

.demo-zoom .control { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.demo-zoom .control input { flex: 1; min-width: 0; accent-color: #be185d; }
.demo-zoom .control input:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.demo-zoom output { min-width: 2.5rem; font-family: ui-monospace, monospace; }

.demo-zoom .row h2 { margin: 0 0 6px; font-size: 0.95rem; font-weight: 600; color: #444; }
.demo-zoom .row code { padding: 0 4px; border-radius: 4px; background: #fce7f3; }
.demo-zoom .lane { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 9rem; padding: 8px; overflow: hidden; border-radius: 12px; background: #fdf2f8; }

.demo-zoom .tile { display: grid; place-content: center; flex: none; width: 4rem; height: 4rem; border-radius: 10px; background: #f9a8d4; font-size: 1rem; font-weight: 700; text-align: center; }
.demo-zoom .target { background: #be185d; color: #fff; }

/* zoom scales the box and its layout: the neighbours are pushed aside. */
.demo-zoom .zoomed .target { zoom: var(--z); }
/* transform paints a scaled copy: nothing else moves. */
.demo-zoom .scaled .target { transform: scale(var(--z)); }

.demo-zoom .unsupported { display: none; margin: 0; padding: 8px 12px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not (zoom: 2) {
  .demo-zoom .unsupported { display: block; }
}

Browser support

First browser version supporting the whole zoom feature
Chrome 1
Edge 12
Firefox 126
Safari 3.1
Chrome Android 18
Safari iOS 3

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

light-dark()

Newly available since May 2024 CSS

web-features The light-dark() CSS function accepts two colors and uses one depending on the current color scheme.

light-dark() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

/* color-scheme tells the browser which scheme is active. light-dark() reads it. */
.demo-ld { color-scheme: light; max-width: 860px; margin: 0 auto; padding: 16px; border-radius: 16px; box-sizing: border-box;
  background: light-dark(#e8ecf4, #0b0c10); color: light-dark(#1b1b1b, #f1f1f1); transition: background-color 0.3s, color 0.3s; }
.demo-ld:has(#dark:checked) { color-scheme: dark; }

.demo-ld .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not (color: light-dark(red, blue)) {
  .demo-ld .unsupported { display: block; }
}

.demo-ld .switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.demo-ld .switch input { position: absolute; opacity: 0; }
.demo-ld .track { position: relative; width: 44px; height: 24px; border-radius: 999px; background: light-dark(#9aa3b5, #4338ca); transition: background-color 0.3s; }
.demo-ld .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; transition: transform 0.3s; }
.demo-ld input:checked + .track::after { transform: translateX(20px); }
.demo-ld input:focus-visible + .track { outline: 3px solid light-dark(#1d4ed8, #93c5fd); outline-offset: 3px; }

.demo-ld .card { margin-top: 14px; padding: 18px; border-radius: 14px; border: 1px solid light-dark(#cbd2e1, #2b2f3b);
  background: light-dark(#fff, #14161c); box-shadow: 0 8px 24px light-dark(rgb(30 40 80 / 0.12), rgb(0 0 0 / 0.6));
  transition: background-color 0.3s, border-color 0.3s; }
.demo-ld .card h2 { margin: 0 0 6px; font-size: 1.2rem; color: light-dark(#4338ca, #a5b4fc); }
.demo-ld .card p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: light-dark(#3a3f4d, #c4c9d6); }
.demo-ld code { padding: 1px 5px; border-radius: 4px; background: light-dark(#eef0f7, #232736); }

.demo-ld .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.demo-ld .chips li { padding: 6px 10px; border-radius: 8px; font: 12px ui-monospace, monospace; }
.demo-ld .chips .a { background: light-dark(#fff, #14161c); color: light-dark(#1b1b1b, #f1f1f1); border: 1px dashed light-dark(#9aa3b5, #6b7280); }
.demo-ld .chips .b { background: light-dark(#4338ca, #a5b4fc); color: light-dark(#fff, #14161c); }

/* color-scheme also restyles the native controls. */
.demo-ld .native { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; }
.demo-ld .native label { display: flex; align-items: center; gap: 8px; }
.demo-ld .native input, .demo-ld .native button { padding: 6px 10px; font: inherit; }

@media (prefers-reduced-motion: reduce) {
  .demo-ld, .demo-ld .track, .demo-ld .track::after, .demo-ld .card { transition: none; }
}

Browser support

First browser version supporting the whole light-dark() feature
Chrome 123
Edge 123
Firefox 120
Safari 17.5
Chrome Android 123
Safari iOS 17.5

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

text-wrap: balance

Newly available since May 2024 Text wrap

web-features The text-wrap: balance CSS declaration balances the length of each line when text is broken into multiple lines. Also known as headline balancing.

Live preview Example from MDN
.whole-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#example-element {
  border: 1px solid #c5c5c5;
  width: 250px;
}

In the reference

The example above is MDN's example for text-wrap-style.

Browser support

First browser version supporting the whole text-wrap: balance feature
Chrome 114
Edge 114
Firefox 121
Safari 17.5
Chrome Android 114
Safari iOS 17.5

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Vertical form controls

Newly available since April 2024 CSS

web-features The writing-mode CSS property orients form elements (such as radio buttons, progress bars, or select menus) vertically when the writing mode is vertical-lr or vertical-rl. The direction CSS property sets whether inputs flow from top to bottom or bottom to top.

Vertical form controls Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-vfc .unsupported { display: none; padding: 10px 14px; border-radius: 8px; background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
@supports not (writing-mode: vertical-lr) { .demo-vfc .unsupported { display: block; } }

.demo-vfc .options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.demo-vfc .modes { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 6px 12px 8px; border: 1px solid #d4d4d8; border-radius: 8px; }
.demo-vfc .options label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: ui-monospace, monospace; font-size: 0.9rem; }
.demo-vfc .hint { margin: 10px 0 12px; color: #52525b; }

.demo-vfc .stage { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.demo-vfc .ctl { padding: 12px 14px; background: #f5f3ff; border: 1px solid #c7d2fe; border-radius: 12px; }
/* Logical margins follow the writing mode: the gap is always between label and control. */
.demo-vfc .ctl label { display: block; margin-block-end: 6px; font-weight: 600; }

/* The mode is set on each control box. Range, progress, meter and select turn with it. */
.demo-vfc:has(#wm-h:checked) .ctl { writing-mode: horizontal-tb; }
.demo-vfc:has(#wm-lr:checked) .ctl { writing-mode: vertical-lr; }
.demo-vfc:has(#wm-rl:checked) .ctl { writing-mode: vertical-rl; }
.demo-vfc:has(#rtl:checked) .ctl { direction: rtl; }

.demo-vfc input[type="range"], .demo-vfc progress, .demo-vfc meter { inline-size: 170px; accent-color: #4f46e5; }
.demo-vfc select { inline-size: 120px; font: inherit; padding: 4px 8px; }
.demo-vfc :is(input, select):focus-visible { outline: 3px solid #1b1b1b; outline-offset: 2px; }

Browser support

First browser version supporting the whole Vertical form controls feature
Chrome 124
Edge 124
Firefox 120
Safari 17.4
Chrome Android 124
Safari iOS 17.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Cutting edge

Limited availability: shipped by some engines in 2023 or later, not yet by all. Use behind @supports, or for progressive enhancement.

random()

Limited availability, moving since October 2026 CSS

web-features The random() CSS function chooses a random numeric value within a specified range. This allows for dynamic, randomized styling using CSS.

random() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-rnd, .demo-rnd * { box-sizing: border-box; }
.demo-rnd { max-width: 860px; margin: 0 auto; }
.demo-rnd .hint { margin: 0 0 12px; }
.demo-rnd .unsupported { display: none; margin: 0 0 12px; padding: 10px 12px; border: 2px dashed #b45309; border-radius: 8px; background: #fffbeb; }
@supports not (width: random(1px, 2px)) {
  .demo-rnd .unsupported { display: block; }
}

.demo-rnd .controls { margin-bottom: 12px; }
.demo-rnd button { font: inherit; font-weight: 600; padding: 8px 16px; border: 2px solid #1b1b1b; border-radius: 8px; background: #fff; color: #1b1b1b; cursor: pointer; }
.demo-rnd button:hover { background: #eef2ff; }
.demo-rnd button:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

.demo-rnd .stage { position: relative; height: 220px; overflow: hidden; border-radius: 12px; background: #0f172a; }

/* Each piece is a separate element, and random() rolls once per element and per property. */
.demo-rnd .stage span {
  position: absolute;
  left: random(0%, 96%);
  top: random(0%, 88%);
  width: random(8px, 22px);
  height: random(8px, 22px);
  border-radius: random(0%, 50%);
  rotate: random(0deg, 360deg);
  background: hsl(random(0, 360) 85% 60%);
  animation: pop 0.5s ease-out backwards;
  animation-delay: random(0s, 0.7s);
}

@keyframes pop {
  from { scale: 0; translate: 0 -40px; opacity: 0; }
}

.demo-rnd .rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 20px; margin-top: 14px; }
.demo-rnd .label { margin: 0 0 6px; font-size: 0.85rem; }
.demo-rnd .row { display: flex; align-items: flex-end; gap: 4px; height: 66px; }
.demo-rnd .row span { flex: none; height: 20px; border-radius: 4px; background: #1d4ed8; }
.demo-rnd .own span { width: random(8px, 30px); height: random(20px, 60px); }
/* One shared name: every square, and both properties, read the same roll. */
.demo-rnd .same span { width: random(--same, 8px, 30px); height: random(--same, 20px, 60px); background: #be185d; }

@media (prefers-reduced-motion: reduce) {
  .demo-rnd .stage span { animation: none; }
}

Browser support

First browser version supporting the whole random() feature
Chrome No
Edge No
Firefox No
Safari No
Chrome Android No
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

margin-trim

Limited availability, moving since October 2026 CSS

web-features The margin-trim CSS property removes the margins of child elements when they meet the edges of the container.

No demo written yet and no MDN example for this feature: read its definition through the links below.

In the reference

Browser support

First browser version supporting the whole margin-trim feature
Chrome No
Edge No
Firefox No
Safari 16.4
Chrome Android No
Safari iOS 16.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

symbols()

Limited availability, moving since October 2026 Lists

web-features The symbols() CSS function defines counter styles as a value of properties such as list-style. It's an inline alternative to the @counter-style CSS at-rule.

Live preview Example from MDN
.default-example {
  font-size: 1.2rem;
}

#example-element {
  width: 100%;
  background: #be094b;
  color: white;
}

section {
  text-align: left;
  flex-direction: column;
}

hr {
  width: 50%;
  color: lightgray;
  margin: 0.5em;
}

.note {
  font-size: 0.8rem;
}

.note a {
  color: #009e5f;
}

@counter-style space-counter {
  symbols: "\1F680" "\1F6F8" "\1F6F0" "\1F52D";
  suffix: " ";
}

In the reference

The example above is MDN's example for list-style.

Browser support

First browser version supporting the whole symbols() feature
Chrome 155
Edge 155
Firefox 35
Safari No
Chrome Android 155
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

text-decoration-skip-spaces

Limited availability, moving since October 2026 Text

web-features The text-decoration-skip-spaces CSS property sets whether text decoration lines (such as underlines and overlines) skip over whitespace characters. You can use this to prevent decorations from being drawn under spaces, which is sometimes more visually appealing.

No demo written yet and no MDN example for this feature: read its definition through the links below.

In the reference

Browser support

First browser version supporting the whole text-decoration-skip-spaces feature
Chrome 155
Edge No
Firefox No
Safari No
Chrome Android No
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

at-rule()

Limited availability, moving since September 2026 CSS

web-features The at-rule() function, when used with @supports, checks if a CSS at-rule is supported. For example @supports at-rule(@starting-style) checks if the @starting-style at-rule is supported.

Live preview Example from MDN
.flex-container > * {
  padding: 0.3em;
  list-style-type: none;
  text-shadow: 0 0 2px red;
  float: left;
}

@supports (display: flex) {
  .flex-container > * {
    text-shadow: 0 0 2px blue;
    float: none;
  }

  .flex-container {
    display: flex;
  }
}

In the reference

The example above is MDN's example for @supports.

Browser support

First browser version supporting the whole at-rule() feature
Chrome 148
Edge 148
Firefox 157
Safari No
Chrome Android 148
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Responsive iframes

Limited availability, moving since September 2026

web-features The frame-sizing CSS property sets the size of an <iframe> element to that of it contents, to avoid scrolling in the iframe. Embedded documents allow this with the <meta name="responsive-embedded-sizing"> element and request resizing in the embedding page by calling window.requestResize().

Live preview Example from MDN
iframe {
  frame-sizing: content-block-size;
  border: 2px solid gray;
}

In the reference

The example above is MDN's example for frame-sizing.

Browser support

First browser version supporting the whole Responsive iframes feature
Chrome 154
Edge 154
Firefox No
Safari No
Chrome Android 154
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Anchor positioning

Limited availability, moving since September 2026 Anchor positioning

web-features Anchor positioning places an element based on the position of another element. For example, you can place a tooltip next to the content it references.

.demo-anchor { --ink: #1b1b1b; --brand: #4f46e5; }
.demo-anchor .unsupported { display: none; padding: 10px 14px; border-radius: 8px; background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
@supports not (anchor-name: --a) { .demo-anchor .unsupported { display: block; } }

.demo-anchor .side { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 8px; padding: 6px 12px 8px; border: 1px solid #d4d4d8; border-radius: 8px; }
.demo-anchor .side label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.demo-anchor .hint { margin: 0 0 8px; color: #52525b; font-size: 0.9rem; }

/* The scroll box is the containing block the tooltips must stay inside. */
.demo-anchor .box {
  position: relative;
  block-size: 210px;
  overflow: auto;
  border: 1px solid #d4d4d8;
  border-radius: 12px;
  background: linear-gradient(#f5f3ff, #fff);
}
.demo-anchor .box:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.demo-anchor .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 64px 12px;
  margin: 0;
  padding: 18px 16px;
  list-style: none;
}

/* One anchor name per chip: anchor-scope keeps each tooltip tied to its own chip. */
.demo-anchor .item { anchor-scope: --tip; justify-self: start; }
.demo-anchor .chip {
  anchor-name: --tip;
  padding: 8px 14px;
  font: inherit;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.demo-anchor .chip:focus-visible { outline: 3px solid #1b1b1b; outline-offset: 2px; }

.demo-anchor .tip {
  position: absolute;
  position-anchor: --tip;
  position-area: top;
  position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline, --hug-start, --hug-end, --hug-start flip-block, --hug-end flip-block;
  position-visibility: anchors-visible;
  inline-size: max-content;
  max-inline-size: 15rem;
  margin: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #1f2430;
  color: #fff;
  font-size: 0.85rem;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.15s;
}
.demo-anchor .chip:is(:hover, :focus-visible) + .tip { visibility: visible; opacity: 1; }

/* Custom fallbacks: line the tooltip up with one edge of the chip instead of centering. */
@position-try --hug-start { position-area: top span-right; }
@position-try --hug-end { position-area: top span-left; }

.demo-anchor:has(#side-right:checked) .tip { position-area: right; }
.demo-anchor:has(#side-bottom:checked) .tip { position-area: bottom; }
.demo-anchor:has(#side-left:checked) .tip { position-area: left; }

@media (prefers-reduced-motion: reduce) { .demo-anchor .tip { transition: none; } }

Browser support

First browser version supporting the whole Anchor positioning feature
Chrome No
Edge No
Firefox No
Safari 27
Chrome Android No
Safari iOS 27

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Anchor positioning transforms

Limited availability, moving since September 2026 Anchor positioning

web-features Anchor positioned elements take CSS transforms on their anchor elements into account.

Live preview Example from MDN
body {
  width: 50%;
  margin: 0 auto;
}

.anchor {
  font-size: 1.8rem;
  color: white;
  text-shadow: 1px 1px 1px black;
  background-color: hsl(240 100% 75%);
  width: fit-content;
  border-radius: 10px;
  border: 1px solid black;
  padding: 3px;
}

.anchor {
  anchor-name: --my-anchor;
}

.infobox {
  color: darkblue;
  background-color: azure;
  border: 1px solid #dddddd;
  padding: 10px;
  border-radius: 10px;
  font-size: 1rem;
}

.infobox {
  position-anchor: --my-anchor;
  position: fixed;
  left: anchor(right);
  top: anchor(top);
  margin-left: 10px;
}

In the reference

The example above is MDN's example for anchor-name.

Browser support

First browser version supporting the whole Anchor positioning transforms feature
Chrome 144
Edge 144
Firefox No
Safari 27
Chrome Android 144
Safari iOS 27

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Case-sensitive attribute selector

Limited availability, moving since September 2026 Selectors

web-features The s identifier in a CSS attribute selector matches attribute values case-sensitively in document languages like HTML where attribute values are case-insensitive.

No demo written yet and no MDN example for this feature: read its definition through the links below.

Browser support

First browser version supporting the whole Case-sensitive attribute selector feature
Chrome No
Edge No
Firefox 66
Safari 27
Chrome Android No
Safari iOS 27

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

color-mix() with three or more colors

Limited availability, moving since September 2026

web-features The color-mix() CSS function accepts three or more colors.

Live preview Example from MDN
ul {
  display: flex;
  list-style-type: none;
  font-size: 150%;
  gap: 10px;
  border: 2px solid;
  padding: 10px;
}

li {
  padding: 10px;
  flex: 1;
  box-sizing: border-box;
  font-family: monospace;
  outline: 3px solid #a71e14;
  text-align: center;
}

li:nth-child(1) {
  background-color: color-mix(in oklab, #a71e14 0%, white);
}

li:nth-child(2) {
  background-color: color-mix(in oklab, #a71e14 25%, white);
}

li:nth-child(3) {
  background-color: color-mix(in oklab, #a71e14 50%, white);
}

li:nth-child(4) {
  background-color: color-mix(in oklab, #a71e14 75%, white);
}

li:nth-child(5) {
  background-color: color-mix(in oklab, #a71e14 100%, white);
}

li:nth-child(6) {
  background-color: color-mix(in oklab, #a71e14, white);
}

In the reference

The example above is MDN's example for color-mix().

Browser support

First browser version supporting the whole color-mix() with three or more colors feature
Chrome No
Edge No
Firefox 150
Safari 27
Chrome Android No
Safari iOS 27

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Customizable <select>

Limited availability, moving since September 2026 Forms

web-features The <select> element's appearance, including the button, selected option, picker dropdown, and options, can be customized using CSS.

Customizable <select> Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

/* The frame height follows the page, so reserve room for the open picker. */
.demo-select {
  --indigo: #4f46e5; --rose: #be123c; --teal: #0f766e; --amber: #b45309; --slate: #475569;
  --accent: var(--indigo);
  min-height: 400px;
}
.demo-select .unsupported { display: none; padding: 10px 14px; border-radius: 8px; background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
@supports not (appearance: base-select) { .demo-select .unsupported { display: block; } }

.demo-select .field { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 8px; }
.demo-select label { font-weight: 600; }

/* Opt in on the select and on its picker. */
.demo-select select,
.demo-select select::picker(select) { appearance: base-select; }

.demo-select select {
  display: flex;
  align-items: center;
  gap: 10px;
  min-inline-size: 200px;
  padding: 8px 12px;
  font: inherit;
  color: #1b1b1b;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 10px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.demo-select select:hover { box-shadow: 0 2px 10px rgb(0 0 0 / 0.15); }
.demo-select select:focus-visible { outline: 3px solid #1b1b1b; outline-offset: 2px; }
.demo-select select::picker-icon { margin-inline-start: auto; color: var(--accent); transition: rotate 0.2s; }
.demo-select select:open::picker-icon { rotate: 180deg; }

.demo-select select::picker(select) {
  margin-block: 6px;
  padding: 6px;
  background: #fff;
  border: 1px solid #d4d4d8;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.25);
  opacity: 0;
  translate: 0 -8px;
  transition: opacity 0.2s, translate 0.2s, overlay 0.2s allow-discrete, display 0.2s allow-discrete;
}
.demo-select select::picker(select):popover-open { opacity: 1; translate: 0; }
@starting-style { .demo-select select::picker(select):popover-open { opacity: 0; translate: 0 -8px; } }

.demo-select option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.demo-select option:hover, .demo-select option:focus-visible { background: #eef2ff; }
.demo-select option:checked { font-weight: 700; }
.demo-select option::checkmark { order: 1; margin-inline-start: auto; color: var(--accent); }
.demo-select selectedcontent { display: flex; align-items: center; gap: 10px; }

/* The swatch is cloned into the button, so color it by class, not through the option. */
.demo-select .swatch { display: inline-block; flex: none; inline-size: 1.1em; block-size: 1.1em; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.2); }
.demo-select .indigo { background: var(--indigo); }
.demo-select .rose { background: var(--rose); }
.demo-select .teal { background: var(--teal); }
.demo-select .amber { background: var(--amber); }
.demo-select .slate { background: var(--slate); }

/* The card reads the choice with :has(), no script. */
.demo-select:has(option[value="rose"]:checked) { --accent: var(--rose); }
.demo-select:has(option[value="teal"]:checked) { --accent: var(--teal); }
.demo-select:has(option[value="amber"]:checked) { --accent: var(--amber); }
.demo-select:has(option[value="slate"]:checked) { --accent: var(--slate); }

.demo-select .hint { margin: 0 0 14px; color: #52525b; font-size: 0.9rem; }
.demo-select .card { max-inline-size: 320px; padding: 14px 18px; border: 1px solid #d4d4d8; border-block-start: 8px solid var(--accent); border-radius: 12px; transition: border-color 0.3s; }
.demo-select .card h2 { margin: 0 0 4px; font-size: 1.1rem; }
.demo-select .card p { margin: 0 0 10px; }
.demo-select .pill { display: inline-block; padding: 3px 12px; color: #fff; background: var(--accent); border-radius: 999px; font-size: 0.85rem; transition: background 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .demo-select select, .demo-select select::picker-icon, .demo-select select::picker(select), .demo-select .card, .demo-select .pill { transition: none; }
}

Browser support

First browser version supporting the whole Customizable <select> feature
Chrome 135
Edge 135
Firefox No
Safari 27
Chrome Android 135
Safari iOS 27

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Heading pseudo-classes

Limited availability, moving since September 2026 Selectors

web-features The :heading and :heading() CSS pseudo-classes match headings of varying levels. The :heading pseudo-class matches any heading (<h1> through <h6>). The :heading() selector matches any of the given levels. For example, :heading(1, 2) matches headings level 1 and 2.

Live preview Example from MDN
:heading {
  color: tomato;
  font-style: italic;
}

In the reference

The example above is MDN's example for :heading.

Browser support

First browser version supporting the whole Heading pseudo-classes feature
Chrome No
Edge No
Firefox No
Safari No
Chrome Android No
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

stretch

Limited availability, moving since September 2026 Layout

web-features The stretch CSS keyword expands a box as needed to fit its contents until the maximum size is reached, without preserving the content's preferred aspect ratio.

Live preview Example from MDN
#example-element {
  display: flex;
  flex-direction: column;
  background-color: #5b6dcd;
  justify-content: center;
  color: white;
}

In the reference

The example above is MDN's example for max-height.

Browser support

First browser version supporting the whole stretch feature
Chrome 138
Edge 138
Firefox No
Safari 27
Chrome Android 138
Safari iOS 27

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

text-autospace

Limited availability, moving since September 2026

web-features The text-autospace CSS property sets whether and how to insert spaces in inter-script text (such as when mixing Latin and Chinese characters) and around punctuation.

Live preview Example from MDN
#example-element {
  font: 2rem sans-serif;
}

p {
  margin: 0;
}

In the reference

The example above is MDN's example for text-autospace.

Browser support

First browser version supporting the whole text-autospace feature
Chrome No
Edge No
Firefox 145
Safari 27
Chrome Android No
Safari iOS 27

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

scroll-axis-lock

Limited availability, moving since September 2026 Scrolling

web-features The scroll-axis-lock property controls whether scrolling is locked to one dimension at a time or freely follows movement in two dimensions. By default, browsers may lock the scroll axis, ignoring minor perpendicular scrolling, when scrolling is nearly vertical or horizontal.

No demo written yet and no MDN example for this feature: read its definition through the links below.

In the reference

Browser support

First browser version supporting the whole scroll-axis-lock feature
Chrome 153
Edge No
Firefox No
Safari No
Chrome Android No
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

attr()

Limited availability, moving since September 2026 CSS

web-features The attr() CSS function, in the context of any property, returns the value of an attribute of an HTML element, with the option to return it as a specific type or unit. You can set a default value for missing or invalid attributes.

Live preview Example from MDN
blockquote {
  margin: 1em 0;
}

blockquote::after {
  display: block;
  content: " (source: " attr(cite) ") ";
  color: hotpink;
}

In the reference

The example above is MDN's example for attr().

Browser support

First browser version supporting the whole attr() feature
Chrome 133
Edge 133
Firefox 155
Safari No
Chrome Android 133
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

font-width

Limited availability, moving since September 2026 Fonts

web-features The font-width CSS property selects a font face from a font family based on width, either by a keyword such as condensed or a percentage.

Live preview Example from MDN
@font-face {
  font-family: "League Mono Ultra Condensed";
  src: url("https://developer.mozilla.org/shared-assets/fonts/LeagueMono-VF.ttf") format("truetype");
  font-width: ultra-condensed; /* same as 50% */
}

@font-face {
  font-family: "League Mono Normal";
  src: url("https://developer.mozilla.org/shared-assets/fonts/LeagueMono-VF.ttf") format("truetype");
  font-width: 100%; /* same as normal */
}

@font-face {
  font-family: "League Mono Ultra Expanded";
  src: url("https://developer.mozilla.org/shared-assets/fonts/LeagueMono-VF.ttf") format("truetype");
  font-width: ultra-expanded; /* same as 200% */
}

p:nth-child(1) {
  font-family: "League Mono Ultra Condensed", sans-serif;
}

p:nth-child(2) {
  font-family: "League Mono Normal", sans-serif;
}

p:nth-child(3) {
  font-family: "League Mono Ultra Expanded", sans-serif;
}

In the reference

The example above is MDN's example for font-width.

Browser support

First browser version supporting the whole font-width feature
Chrome No
Edge No
Firefox No
Safari 18.4
Chrome Android No
Safari iOS 18.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

window-drag

Limited availability, moving since August 2026 CSS

web-features The window-drag: move CSS declaration sets an element as a window drag handle, like a device's app title bar. You can use this to add click-and-drag areas to an installed progressive web app, often alongside window controls overlay.

No demo written yet and no MDN example for this feature: read its definition through the links below.

In the reference

Browser support

First browser version supporting the whole window-drag feature
Chrome 152
Edge 152
Firefox No
Safari No
Chrome Android No
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

text-box

Limited availability, moving since August 2026 Text

web-features The text-box CSS property sets the spacing above and below text based on a font's typographic features. For example, text-box: trim-both ex alphabetic trims the top to the top of the letter x and the bottom to the bottom of most letters, without descenders.

text-box Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

Dashed chips belong to the same feature but this demo does not use them.

.demo-textbox { max-width: 50rem; margin-inline: auto; }
.demo-textbox .pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 16px; }
.demo-textbox .col { display: grid; justify-items: start; gap: 14px; padding: 14px; border: 2px solid #e2e8f0; border-radius: 14px; }
.demo-textbox .col-trim { border-color: #4f46e5; }
.demo-textbox h2 { margin: 0; font: 700 0.85rem ui-monospace, monospace; color: #334155; }

/* The pink band is the content box: it shows exactly where the text box starts and ends. */
.demo-textbox .tb {
  margin: 0;
  padding: 18px 28px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(#fda4af, #fda4af) content-box, #1e293b;
  color: #1b1b1b;
  font-family: system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.6;
}
.demo-textbox .big { font-size: 4rem; letter-spacing: 0.04em; }
.demo-textbox .btn { font-size: 1.4rem; cursor: pointer; }
.demo-textbox .btn:hover { filter: brightness(1.1); }
.demo-textbox .btn:focus-visible { outline: 3px solid #4f46e5; outline-offset: 3px; }

/* Trim the leading above the capital letters and below the baseline. */
.demo-textbox .col-trim .tb { text-box: trim-both cap alphabetic; }

.demo-textbox .note { margin: 14px 0 0; color: #555; font-size: 0.9rem; }

.demo-textbox .unsupported { display: none; margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #78350f; }
@supports not (text-box: trim-both cap alphabetic) {
  .demo-textbox .unsupported { display: block; }
}

Browser support

First browser version supporting the whole text-box feature
Chrome 133
Edge 133
Firefox No
Safari 18.2
Chrome Android 133
Safari iOS 18.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

ruby-overhang

Limited availability, moving since July 2026 Ruby

web-features The ruby-overhang CSS property sets whether ruby annotations may overlap adjacent text.

Live preview Example from MDN
#default-example {
  font-size: 2em;
}

In the reference

The example above is MDN's example for ruby-overhang.

Browser support

First browser version supporting the whole ruby-overhang feature
Chrome 151
Edge 151
Firefox No
Safari 18.2
Chrome Android 151
Safari iOS 18.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

alignment-baseline

Limited availability, moving since July 2026 Text

web-features The alignment-baseline CSS property sets which baseline of an element is aligned with the corresponding baseline of its parent.

No demo written yet and no MDN example for this feature: read its definition through the links below.

In the reference

Browser support

First browser version supporting the whole alignment-baseline feature
Chrome 1
Edge 79
Firefox No
Safari 5.1
Chrome Android 18
Safari iOS 5

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Picture-in-picture (video)

Limited availability, moving since July 2026

web-features The picture-in-picture API allow websites to create a floating, always-on-top video window. Also known as PiP or pop-out video.

Live preview Example from MDN
abbr {
  color: #860304;
  font-weight: bold;
  transition: color 0.5s ease;
}

@media (hover: hover) {
  abbr:hover {
    color: #001ca8;
    transition-duration: 0.5s;
  }
}

@media not all and (hover: hover) {
  abbr::after {
    content: " (" attr(title) ")";
  }
}

In the reference

The example above is MDN's example for @media.

Browser support

First browser version supporting the whole Picture-in-picture (video) feature
Chrome 69
Edge 79
Firefox 153
Safari 13.1
Chrome Android 105
Safari iOS 13.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

background-clip: border-area

Limited availability, moving since June 2026 Background

web-features The background-clip: border-area CSS declaration draws the background underneath only the border of an element.

Live preview Example from MDN
#example-element {
  background-image: url("https://developer.mozilla.org/shared-assets/images/examples/leopard.jpg");
  color: white;
  text-shadow: 2px 2px black;
  padding: 20px;
  border: 10px dashed #333333;
  font-size: 2em;
  font-weight: bold;
}

In the reference

The example above is MDN's example for background-clip.

Browser support

First browser version supporting the whole background-clip: border-area feature
Chrome 150
Edge 150
Firefox No
Safari 18.2
Chrome Android 150
Safari iOS 18.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

cross-origin() for url()

Limited availability, moving since June 2026

web-features The url() CSS function accepts a cross-origin() modifier to control cross-origin resource sharing (CORS) when requesting the URL. For example, url("https://example.com" cross-origin(anonymous))) does not send credentials to the URL.

Live preview Example from MDN
ul {
  font-size: 3rem;
  margin: 0;
}

ul {
  list-style: outside
    url("https://mdn.github.io/shared-assets/images/examples/firefox-logo.svg");
}

In the reference

The example above is MDN's example for url().

Browser support

First browser version supporting the whole cross-origin() for url() feature
Chrome 150
Edge 150
Firefox No
Safari 26.2
Chrome Android 150
Safari iOS 26.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

flex-wrap: balance

Limited availability, moving since June 2026 Flexbox

web-features The flex-wrap: balance CSS declaration distributes items in a multi-line flex container such that each line has about the same number of items.

Live preview Example from MDN
#example-element {
  border: 1px solid #c5c5c5;
  width: 80%;
  display: flex;
}

#example-element > div {
  background-color: rgb(0 0 255 / 0.2);
  border: 3px solid blue;
  width: 60px;
  margin: 10px;
}

In the reference

The example above is MDN's example for flex-wrap.

Browser support

First browser version supporting the whole flex-wrap: balance feature
Chrome 150
Edge 150
Firefox No
Safari No
Chrome Android 150
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

integrity() for url()

Limited availability, moving since June 2026

web-features The url() CSS function accepts an integrity() modifier to use subresource integrity to verify the response from the requested URL.

Live preview Example from MDN
ul {
  font-size: 3rem;
  margin: 0;
}

ul {
  list-style: outside
    url("https://mdn.github.io/shared-assets/images/examples/firefox-logo.svg");
}

In the reference

The example above is MDN's example for url().

Browser support

First browser version supporting the whole integrity() for url() feature
Chrome 150
Edge 150
Firefox No
Safari No
Chrome Android 150
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

named-feature()

Limited availability, moving since June 2026 CSS

web-features The named-feature() function, when used with @supports, checks if a named CSS behavior is supported. The CSS behavior names are defined by specification. For example, @supports named-feature(anchor-position-follows-transforms) checks whether anchor-positioning applies after transforms."

Live preview Example from MDN
.flex-container > * {
  padding: 0.3em;
  list-style-type: none;
  text-shadow: 0 0 2px red;
  float: left;
}

@supports (display: flex) {
  .flex-container > * {
    text-shadow: 0 0 2px blue;
    float: none;
  }

  .flex-container {
    display: flex;
  }
}

In the reference

The example above is MDN's example for @supports.

Browser support

First browser version supporting the whole named-feature() feature
Chrome 150
Edge 150
Firefox No
Safari No
Chrome Android 150
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

referrer-policy() for url()

Limited availability, moving since June 2026

web-features The url() CSS function accepts a referrer-policy() modifier to choose which referrer to send when requesting the URL. For example, `url("https://example.com" referrer-policy(no-referrer)) does not send a referrer to the URL.

Live preview Example from MDN
ul {
  font-size: 3rem;
  margin: 0;
}

ul {
  list-style: outside
    url("https://mdn.github.io/shared-assets/images/examples/firefox-logo.svg");
}

In the reference

The example above is MDN's example for url().

Browser support

First browser version supporting the whole referrer-policy() for url() feature
Chrome 150
Edge 150
Firefox No
Safari 26.2
Chrome Android 150
Safari iOS 26.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

text-fit

Limited availability, moving since June 2026

web-features The text-fit CSS property scales text to fill the inline size of its container. You can use this to grow or shrink headlines, captions, or pull quotes to fit a container.

Live preview Example from MDN
* {
  box-sizing: border-box;
}

html {
  font-family: sans-serif;
  background-color: white;
}

div {
  margin: 0 auto;
  background-color: coral;
}

input {
  width: 99%;
}

div {
  padding: 20px;
}

h1 {
  text-fit: grow;
}

h2 {
  white-space: nowrap;
  text-fit: shrink;
}

In the reference

The example above is MDN's example for text-fit.

Browser support

First browser version supporting the whole text-fit feature
Chrome 150
Edge 150
Firefox No
Safari No
Chrome Android 150
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

AccentColor and AccentColorText

Limited availability, moving since June 2026 Color types

web-features The AccentColor and AccentColorText CSS system color values are the background color and text color of accented user interface controls. To prevent browser fingerprinting, browsers may (and often do) use fixed color values that do not reflect user customization or theming choices.

Live preview Example from MDN
.button {
  border: 0;
  padding: 10px;
  box-shadow:
    -2px -2px 5px gray,
    2px 2px 5px gray;
}

@media (forced-colors: active) {
  .button {
    /* Use a border instead, since box-shadow
    is forced to 'none' in forced-colors mode */
    border: 2px ButtonBorder solid;
  }
}

In the reference

The example above is MDN's example for <system-color>.

Browser support

First browser version supporting the whole AccentColor and AccentColorText feature
Chrome 149
Edge 149
Firefox 103
Safari 16.5
Chrome Android No
Safari iOS 16.5

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

CSSPseudoElement

Limited availability, moving since June 2026 CSS object models

web-features A CSSPseudoElement object represents a pseudo-element and its context in the document tree. You get an instance through the pseudo() method of Element or CSSPseudoElement objects or the pseudoTarget property of some events.

No demo written yet and no MDN example for this feature: read its definition through the links below.

Browser support

First browser version supporting the whole CSSPseudoElement feature
Chrome 149
Edge 149
Firefox No
Safari No
Chrome Android 149
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Gap decorations

Limited availability, moving since June 2026 Grid

web-features The column-rule and row-rule CSS properties display decorative lines between columns and rows of a flex, grid, or multi-column layout. The rule-break, rule-outset, and rule-paint-order properties control the appearance of these lines.

Live preview Example from MDN
#example-element {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  column-rule: solid thick orange;
  row-rule: solid thick lavender;
  gap: 15px;
  rule-overlap: column-over-row;
}
#example-element i {
  padding: 5px;
}

Interest invokers

Limited availability, moving since June 2026 HTML

web-features Interest invokers, registered by the interestfor HTML attribute, trigger events and actions on a target element when a user shows interest in the element, through behaviors such as hover, focus, or long-press. Pseudo-elements apply styles to sources and targets of interest.

Live preview Example from MDN
.delay {
  interest-delay: 1s 2s;
}

In the reference

The example above is MDN's example for interest-delay.

Browser support

First browser version supporting the whole Interest invokers feature
Chrome 149
Edge 149
Firefox No
Safari No
Chrome Android 149
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Fullscreen API

Limited availability, moving since May 2026

web-features The fullscreen API makes a specific element fill the whole screen and hides most browser UI.

Live preview Example from MDN
button {
  font-size: 1.2rem;
  padding: 5px 15px;
}

dialog::backdrop {
  background-color: salmon;
}

In the reference

The example above is MDN's example for ::backdrop.

Browser support

First browser version supporting the whole Fullscreen API feature
Chrome 71
Edge 79
Firefox 64
Safari 16.4
Chrome Android 71
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Range syntax for style queries

Limited availability, moving since May 2026 Container queries

web-features The @container style() CSS at-rule and if(style()) CSS function queries accept a range syntax, such as >, <, >=, <=, to query for inexact values.

Live preview Example from MDN
span {
  display: block;
  text-align: center;
}
.card {
  margin: 10px;
  border: 2px dotted;
  font-size: 1.5em;
}
.post {
  border: 2px solid;
}

/* A container context based on inline size */
.post {
  container-type: inline-size;
}

/* Apply styles if the container is narrower than 650px */
@container (width < 650px) {
  .card {
    width: 50%;
    background-color: lightgray;
    font-size: 1em;
  }
}

In the reference

The example above is MDN's example for @container.

Browser support

First browser version supporting the whole Range syntax for style queries feature
Chrome 142
Edge 142
Firefox No
Safari No
Chrome Android 142
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Hanging punctuation

Limited availability, moving since May 2026

web-features The hanging-punctuation CSS property puts punctuation characters outside of the box to align the text with the rest of the document.

Live preview Example from MDN
p {
  width: 15em;
  border: 1px solid #cccccc;
  font-size: 2rem;
  font-style: italic;
  margin: 1em;
}

p.hanging {
  hanging-punctuation: first last;
}

p.right {
  text-align: right;
}

In the reference

The example above is MDN's example for hanging-punctuation.

Browser support

First browser version supporting the whole Hanging punctuation feature
Chrome No
Edge No
Firefox No
Safari 26.5
Chrome Android No
Safari iOS 26.5

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Media element pseudo-classes

Limited availability, moving since April 2026 Media elements

web-features The :playing, :paused, :seeking, :buffering, :stalled, :muted, and :volume-locked CSS pseudo-classes match <audio> and <video> elements based on their state.

No demo written yet and no MDN example for this feature: read its definition through the links below.

In the reference

Browser support

First browser version supporting the whole Media element pseudo-classes feature
Chrome No
Edge No
Firefox 150
Safari 15.4
Chrome Android No
Safari iOS 15.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

overscroll-behavior

Limited availability, moving since April 2026 Scrolling

web-features The overscroll-behavior CSS property disables default scrolling behaviors when the edges of a scrolling area are reached.

Live preview Example from MDN
.example-container {
  width: 35em;
  height: 18em;
  border: medium dotted;
  padding: 0.75em;
  text-align: left;
  overflow: auto;
  display: flex;
}

.box {
  width: 50%;
}

#example-element {
  width: 50%;
  height: 12em;
  border: medium dotted #1b76c4;
  padding: 0.3em;
  margin: 0 0.3em;
  text-align: left;
  overflow: auto;
  overscroll-behavior: contain;
}

In the reference

The example above is MDN's example for overscroll-behavior.

Browser support

First browser version supporting the whole overscroll-behavior feature
Chrome 144
Edge 144
Firefox 150
Safari No
Chrome Android 144
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

border-shape

Limited availability, moving since April 2026

web-features The border-shape CSS property sets the geometry of the border box, changing the shape of any applicable border, border image, focus outline, or shadow.

Live preview Example from MDN
html {
  height: 100%;
}

body {
  margin: 0;
  height: inherit;
  display: flex;
  justify-content: center;
  align-items: center;
}

p {
  box-sizing: border-box;
  font-family: "Helvetica", "Arial";
  font-size: 1.6rem;
  padding: 40px 50px;
  background-color: chartreuse;
  display: flex;
  align-items: center;
}

p {
  width: fit-content;
  aspect-ratio: 1/1;
  border: 15px solid black;
  box-shadow: 5px 5px 10px rgb(0 0 0 / 0.5);
  border-shape: circle(50%);
}

In the reference

The example above is MDN's example for border-shape.

Browser support

First browser version supporting the whole border-shape feature
Chrome 147
Edge 147
Firefox No
Safari No
Chrome Android 147
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Element-scoped view transitions

Limited availability, moving since April 2026 View transitions

web-features The startViewTransition() method of an Element object starts a view transition that affects only that element's DOM tree. You can use this to run separate elements' transitions concurrently.

Live preview Example from MDN
body {
  font: 1.2em / 1.5 sans-serif;
  width: 50%;
  max-width: 700px;
  margin: 0 auto;
}

section,
.change-me {
  border: 2px solid #666666;
  padding: 10px;
}

section {
  background-color: orange;
}

.change-me {
  background-color: white;
  view-transition-name: para-change;
  view-transition-scope: all;
}

::view-transition-group(para-change) {
  animation-duration: 1s;
}

In the reference

The example above is MDN's example for view-transition-scope.

Browser support

First browser version supporting the whole Element-scoped view transitions feature
Chrome 147
Edge 147
Firefox No
Safari No
Chrome Android 147
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Grid lanes

Limited availability, moving since March 2026 Layout

web-features The display: grid-lanes and display: inline-grid-lanes CSS declarations create a layout where items are tightly packed in parallel lanes. Items are placed one by one in the lane that has the most available space. Also known as masonry.

Live preview Example from MDN
.example-container {
  width: 100%;
  height: 100%;
}

code {
  background: #88888888;
}

#example-element {
  border: 3px dashed orange;
}

.child {
  display: inline-block;
  padding: 0.5em 1em;
  background-color: #ccccff;
  border: 1px solid #ababab;
  color: black;
}

In the reference

The example above is MDN's example for display.

Browser support

First browser version supporting the whole Grid lanes feature
Chrome No
Edge No
Firefox No
Safari No
Chrome Android No
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Scroll-triggered animations

Limited availability, moving since March 2026 Scrolling

web-features Scroll-triggered animations start and stop CSS animations when an element is within or outside a scrolling range. It's an alternative to applying styles with the IntersectionObserver API. Not to be confused with scroll-driven animations.

Live preview Example from MDN
body {
  width: 80%;
  margin: 0 auto;
  font-family: "Helvetica", "Arial";
  font-size: 1.3rem;
}

div {
  height: 100px;
  border: 5px solid black;
}

.animated {
  width: 100px;
  background: orange;
}

.trigger {
  background: wheat;
}

.animated {
  position: fixed;
  top: 25px;
  left: 25px;
}

@keyframes rotate {
  from {
    rotate: 0deg;
  }

  to {
    rotate: 360deg;
  }
}

.animated {
  animation: rotate 3s infinite linear both;
  animation-trigger: --t play pause;
}

.trigger {
  timeline-trigger-name: --t;
  timeline-trigger-source: view();
}

In the reference

The example above is MDN's example for animation-trigger.

Browser support

First browser version supporting the whole Scroll-triggered animations feature
Chrome 146
Edge 146
Firefox No
Safari No
Chrome Android 146
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

overflow-clip-margin

Limited availability, moving since February 2026 CSS

web-features The overflow-clip-margin CSS property sets how far overflow content may appear outside the bounds of an element before it's clipped by effects such as overflow: clip.

overflow-clip-margin Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.ocm { --m: 0px; max-width: 640px; margin: 0 auto; }
.ocm:has(#ocm-12:checked) { --m: 12px; }
.ocm:has(#ocm-24:checked) { --m: 24px; }
.ocm:has(#ocm-40:checked) { --m: 40px; }

.ocm .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fef3c7; color: #78350f; }
@supports not (overflow-clip-margin: 10px) { .ocm .unsupported { display: block; } }

.ocm-title { margin: 0 0 10px; font-size: 1.2rem; }
.ocm-picks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 8px 14px; border: 2px solid #c7d2fe; border-radius: 12px; }
.ocm-picks legend { padding: 0 6px; font-family: ui-monospace, monospace; font-size: 0.9rem; }
.ocm-picks label { cursor: pointer; }
.ocm-picks input { accent-color: #4338ca; }

.ocm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.ocm-card { margin: 0; display: grid; justify-items: center; gap: 14px; padding: 48px 0 8px; }
.ocm-card figcaption { margin-top: var(--m); color: #44403c; font-size: 0.9rem; text-align: center; }

.ocm-frame {
  position: relative;
  width: 140px;
  height: 140px;
  border: 3px solid #312e81;
  border-radius: 6px;
  background: #eef2ff;
}
.ocm-hidden { overflow: hidden; }

/* overflow: clip does not scroll. overflow-clip-margin moves its clip edge outward. */
.ocm-clip {
  overflow: clip;
  overflow-clip-margin: var(--m);
}
/* A dashed guide drawn exactly on the clip edge. */
.ocm-clip::after {
  content: "";
  position: absolute;
  inset: calc(var(--m) * -1);
  border: 2px dashed #4338ca;
  pointer-events: none;
}

.ocm-spin {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f97316, #db2777);
  animation: ocm-turn 8s linear infinite;
}
@keyframes ocm-turn { to { rotate: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  .ocm-spin { animation: none; rotate: 45deg; }
}

Browser support

First browser version supporting the whole overflow-clip-margin feature
Chrome No
Edge No
Firefox 148
Safari No
Chrome Android No
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

column-wrap

Limited availability, moving since February 2026 Multi-column

web-features The column-wrap and column-height CSS properties control when columns in a multicolumn layout wrap or overflow. You can use this to constrain the height of columns within a taller box or to create two-dimensional column layouts.

Live preview Example from MDN
ol {
  column-width: 150px;
  gap: 2em;
  column-height: 3em;
}

In the reference

The example above is MDN's example for column-height.

Browser support

First browser version supporting the whole column-wrap feature
Chrome 145
Edge 145
Firefox No
Safari No
Chrome Android 145
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

text-justify

Limited availability, moving since February 2026 Text

web-features The text-justify CSS property sets the justification method of text when text-align: justify is set.

Live preview Example from MDN
p {
  font-size: 1.5em;
  border: 1px solid black;
  padding: 10px;
  width: 95%;
  margin: 10px auto;
  text-align: justify;
}

.none {
  text-justify: none;
}

.auto {
  text-justify: auto;
}

.dist {
  text-justify: distribute;
}

.word {
  text-justify: inter-word;
}

.char {
  text-justify: inter-character;
}

In the reference

The example above is MDN's example for text-justify.

Browser support

First browser version supporting the whole text-justify feature
Chrome 145
Edge 145
Firefox 55
Safari No
Chrome Android 145
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

caret-shape

Limited availability, moving since January 2026

web-features The caret-shape CSS property sets the shape of the insertion caret, the symbol that shows where the next character is to be inserted or deleted.

Live preview Example from MDN
div {
  text-align: left;
}

#example-element {
  font-size: 1.2rem;
  padding: 8px;
  width: 300px;
}

In the reference

The example above is MDN's example for caret-shape.

Browser support

First browser version supporting the whole caret-shape feature
Chrome 144
Edge 144
Firefox No
Safari No
Chrome Android 144
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Container scroll-state queries

Limited availability, moving since January 2026 Container queries

web-features Container scroll-state queries with the @container scroll-state(...) at-rule apply styles to an element based on the sticky positioning, snapped, scrollable, and scrolled state of the container.

Live preview Example from MDN
span {
  display: block;
  text-align: center;
}
.card {
  margin: 10px;
  border: 2px dotted;
  font-size: 1.5em;
}
.post {
  border: 2px solid;
}

/* A container context based on inline size */
.post {
  container-type: inline-size;
}

/* Apply styles if the container is narrower than 650px */
@container (width < 650px) {
  .card {
    width: 50%;
    background-color: lightgray;
    font-size: 1em;
  }
}

In the reference

The example above is MDN's example for @container.

Browser support

First browser version supporting the whole Container scroll-state queries feature
Chrome 144
Edge 144
Firefox No
Safari No
Chrome Android 144
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

accent-color

Limited availability, moving since December 2025 CSS

web-features The accent-color CSS property sets a color for checkboxes, radio buttons, and other form controls.

accent-color Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-accent { --accent: #e11d48; }
.demo-accent .unsupported { display: none; padding: 10px 14px; border-radius: 8px; background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
@supports not (accent-color: red) { .demo-accent .unsupported { display: block; } }

.demo-accent .picker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.demo-accent .picker label { font-weight: 600; }
.demo-accent #pick { inline-size: 56px; block-size: 36px; padding: 0; cursor: pointer; }
.demo-accent #pick:focus-visible { outline: 3px solid #1b1b1b; outline-offset: 2px; }
.demo-accent output { font-family: ui-monospace, monospace; }

.demo-accent .panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.demo-accent .panel { padding: 14px 16px; background: #fff; color: #1b1b1b; border: 1px solid #d4d4d8; border-radius: 14px; }
.demo-accent .panel h2 { margin: 0 0 10px; font-size: 1rem; }
.demo-accent .row { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 0; border: 0; }
.demo-accent .radios { gap: 14px; }
.demo-accent .radios label { display: inline-flex; align-items: center; gap: 6px; }
.demo-accent .radios legend { float: left; padding: 0; margin-inline-end: 10px; }
.demo-accent input:focus-visible { outline: 3px solid #1b1b1b; outline-offset: 2px; }

/* One line recolors every native control. The first panel keeps the default. */
.demo-accent .plain { accent-color: auto; }
.demo-accent .tinted { accent-color: var(--accent); }

/* The checkmark and the thumb stay readable on a dark scheme too. */
.demo-accent .dark { color-scheme: dark; background: #18181b; color: #fafafa; border-color: #3f3f46; }
.demo-accent .dark input:focus-visible { outline-color: #fafafa; }

Browser support

First browser version supporting the whole accent-color feature
Chrome 93
Edge 93
Firefox 92
Safari 26.2
Chrome Android No
Safari iOS 26.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Anchor position container queries

Limited availability, moving since December 2025 Anchor positioning

web-features Anchor position container queries with the @container anchored(fallback: …) at-rule apply styles to an element based on the element's anchor position.

Live preview Example from MDN
span {
  display: block;
  text-align: center;
}
.card {
  margin: 10px;
  border: 2px dotted;
  font-size: 1.5em;
}
.post {
  border: 2px solid;
}

/* A container context based on inline size */
.post {
  container-type: inline-size;
}

/* Apply styles if the container is narrower than 650px */
@container (width < 650px) {
  .card {
    width: 50%;
    background-color: lightgray;
    font-size: 1em;
  }
}

In the reference

The example above is MDN's example for @container.

Browser support

First browser version supporting the whole Anchor position container queries feature
Chrome 143
Edge 143
Firefox No
Safari No
Chrome Android 143
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

font-language-override

Limited availability, moving since December 2025 Typographic font features

web-features The font-language-override CSS property sets which language-specific glyphs are displayed.

Live preview Example from MDN
p.para1 {
  font-language-override: normal;
}

p.para2 {
  font-language-override: "DAN";
}

In the reference

The example above is MDN's example for font-language-override.

Browser support

First browser version supporting the whole font-language-override feature
Chrome 143
Edge 143
Firefox 34
Safari No
Chrome Android 143
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Scroll marker target pseudo-classes

Limited availability, moving since October 2025 Scroll markers

web-features The :target-current CSS pseudo-class selects the active scroll marker (as in ::scroll-marker), while the :target-after and :target-before pseudo-classes select the inactive markers preceding and following the active scroll marker.

Live preview Example from MDN
body {
  font: 1.2em / 1.5 system-ui;
  width: 50%;
  max-width: 700px;
  margin: 0 auto;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
}

section {
  padding-top: 60px;
}

a {
  color: black;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

ol {
  display: flex;
  width: 100%;
  justify-content: space-around;
  list-style-type: none;
  padding: 20px 0;
  margin: 0;
  background: white;
}

@supports not selector(:target-after) {
  body::before {
    content: "Your browser does not support the :target-before and :target-after pseudo-classes.";
    color: black;
    background-color: #ffcd33;
    text-align: center;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
  }
}

ol {
  scroll-target-group: auto;
}

:target-current {
  color: red;
}

a:target-before {
  color: gray;
  text-decoration: line-through;
}

a:target-after {
  text-decoration: underline orange 2px;
}

In the reference

The example above is MDN's example for :target-after.

Browser support

First browser version supporting the whole Scroll marker target pseudo-classes feature
Chrome 142
Edge 142
Firefox No
Safari No
Chrome Android 142
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Anchor positioning animations and transitions

Limited availability, moving since September 2025 Anchor positioning

web-features The anchor() and anchor-size() CSS functions animate or transition on changes such as the anchor box moving or the anchor element changing.

Live preview Example from MDN
.anchor {
  font-size: 2rem;
  color: white;
  text-shadow: 1px 1px 1px black;
  background-color: hsl(240 100% 75%);
  text-align: center;
  align-content: center;
  outline: 1px solid black;
}

body {
  width: 80%;
  margin: 0 auto;
}

.infobox {
  align-content: center;
  color: darkblue;
  background-color: azure;
  outline: 1px solid #dddddd;
  font-size: 1rem;
  text-align: center;
}

.anchor {
  anchor-name: --my-anchor;
  width: 100px;
  height: 50px;
}

.infobox {
  position-anchor: --my-anchor;
  position: fixed;
}

#infobox1 {
  position-area: right;
  height: anchor-size(height);
  width: calc(anchor-size(width) * 2);
  margin-left: 5px;
}

#infobox2 {
  position-area: top span-right;
  height: calc(anchor-size(height) / 1.25);
  margin-bottom: 5px;
}

In the reference

The example above is MDN's example for anchor-size().

Browser support

First browser version supporting the whole Anchor positioning animations and transitions feature
Chrome 125
Edge 125
Firefox No
Safari 26
Chrome Android 125
Safari iOS 26

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

dynamic-range-limit

Limited availability, moving since September 2025 CSS

web-features The dynamic-range-limit CSS property controls the peak luminance of high dynamic range content. You can use this to coordinate the apparent brightness of HDR and SDR content.

Live preview Example from MDN
img {
  dynamic-range-limit: standard;
  transition: dynamic-range-limit 0.6s;
}

img:hover,
img:focus {
  dynamic-range-limit: no-limit;
}

img {
  max-height: 100vh;
}
@media not (dynamic-range: high) {
  body::before {
    content: "Your device may not display the image at full brightness.";
    background-color: wheat;
    display: block;
    text-align: center;
  }
}
@supports not (dynamic-range-limit: standard) {
  body::before {
    content: "Your browser doesn't support the dynamic-range-limit property.";
    background-color: wheat;
    display: block;
    text-align: center;
  }
}

In the reference

The example above is MDN's example for dynamic-range-limit.

Browser support

First browser version supporting the whole dynamic-range-limit feature
Chrome 136
Edge 136
Firefox No
Safari No
Chrome Android 136
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

text-wrap: pretty

Limited availability, moving since September 2025 Text wrap

web-features The text-wrap: pretty CSS declaration prioritizes better layout over speed when text is broken into multiple lines.

text-wrap: pretty Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-pretty { --accent: #0d9488; max-width: 52rem; margin-inline: auto; }
.demo-pretty .hint { margin: 0 0 10px; color: #555; font-size: 0.9rem; }

/* Resize the box: both columns get the same width, only the wrapping differs. */
.demo-pretty .stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  box-sizing: border-box;
  width: 36rem;
  min-width: 14rem;
  max-width: 100%;
  padding: 14px;
  overflow: hidden;
  resize: horizontal;
  border: 2px dashed #9ca3af;
  border-radius: 14px;
  background: #f4fbfa;
}
.demo-pretty .col { padding: 10px 12px; background: #fff; border-radius: 10px; border-top: 5px solid var(--accent); }
.demo-pretty .col h2 { margin: 0 0 6px; color: var(--accent); font: 700 0.85rem ui-monospace, monospace; }
.demo-pretty .body { margin: 0; font-size: 1rem; line-height: 1.5; }

.demo-pretty .body-auto { text-wrap: auto; }
/* pretty trades speed for a better rag: it avoids a short last line. */
.demo-pretty .body-pretty { text-wrap: pretty; }

.demo-pretty .stat { margin: 8px 0 0; font-size: 0.85rem; color: #444; }
.demo-pretty .stat strong { padding: 1px 8px; border-radius: 99px; background: #e5e7eb; }
.demo-pretty .stat strong.lone { background: #fecaca; color: #7f1d1d; }
.demo-pretty .stat strong.ok { background: #bbf7d0; color: #14532d; }

@media (max-width: 30rem) {
  .demo-pretty .stage { grid-template-columns: minmax(0, 1fr); }
}

.demo-pretty .unsupported { display: none; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #78350f; }
@supports not (text-wrap-style: pretty) {
  .demo-pretty .unsupported { display: block; }
}

Browser support

First browser version supporting the whole text-wrap: pretty feature
Chrome 117
Edge 117
Firefox No
Safari 26
Chrome Android 117
Safari iOS 26

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

scroll-target-group

Limited availability, moving since September 2025 Scroll markers

web-features The scroll-target-group CSS property sets the container where anchor links act as scroll markers. Using selectors such as :target-current, you can style elements when a target has scrolled into view. It's an alternative to the ::scroll-marker-group pseudo-element, which generates scroll markers.

Live preview Example from MDN
body {
  font: 1.2em / 1.5 system-ui;
  width: 50%;
  max-width: 700px;
  margin: 0 auto;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
}

section {
  padding-top: 60px;
}

a {
  color: black;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

ol {
  display: flex;
  width: 100%;
  justify-content: space-around;
  list-style-type: none;
  padding: 20px 0;
  margin: 0;
  background: white;
}

ol {
  scroll-target-group: auto;
}

:target-current {
  color: red;
}

In the reference

The example above is MDN's example for scroll-target-group.

Browser support

First browser version supporting the whole scroll-target-group feature
Chrome 140
Edge 140
Firefox No
Safari No
Chrome Android 140
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

@function

Limited availability, moving since August 2025 CSS

web-features The @function CSS at-rule defines a custom function that takes CSS values or custom properties as arguments, and returns a CSS value. It can be based on conditional logic such as by using the @media at-rule.

@function Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

Dashed chips belong to the same feature but this demo does not use them.

/* Two custom functions: the name starts with --, the parameters are typed, and result is the return value. */
@function --space(--n <number>: 1) returns <length> {
  result: calc(var(--n) * 0.5rem);
}

@function --tint(--color <color>, --amount <percentage>: 25%) returns <color> {
  result: color-mix(in oklab, var(--color), white var(--amount));
}

.demo-fn, .demo-fn * { box-sizing: border-box; }
.demo-fn { max-width: 860px; margin: 0 auto; }
.demo-fn .hint { margin: 0 0 14px; }
/* The message shows by default. --hide() returns none, so only a browser that runs @function hides it. Elsewhere the second display is a parse error and block stays. */
@function --hide() {
  result: none;
}
.demo-fn .unsupported { display: block; display: --hide(); margin: 0 0 14px; padding: 10px 12px; border: 2px dashed #b45309; border-radius: 8px; background: #fffbeb; }
@supports not at-rule(@function) {
  .demo-fn .unsupported { display: block; }
}

.demo-fn .controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 24px; margin-bottom: 16px; }
.demo-fn .ctl { display: grid; gap: 6px; font-weight: 600; }
.demo-fn output { font-weight: 400; font-variant-numeric: tabular-nums; }
.demo-fn input[type="range"] { width: 100%; accent-color: #4338ca; }
.demo-fn input:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

.demo-fn .stage {
  --brand: oklch(0.5 0.2 275);
  --n: 3;
  --amt: 12;
  list-style: none;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: --space(var(--n));
  padding: --space(var(--n));
  border: 2px dashed #94a3b8;
  border-radius: 16px;
  transition: gap 0.25s, padding 0.25s;
}

.demo-fn .swatch {
  flex: 1 1 60px;
  min-height: 120px;
  border-radius: 12px;
  /* --i is 0 to 4: each swatch is one more step lighter than the one before. */
  background: --tint(var(--brand), calc(var(--i) * var(--amt) * 1%));
  transition: background-color 0.25s;
}

/* No second argument: --amount falls back to its default, 25%. */
.demo-fn .swatch.default {
  display: grid;
  place-items: center;
  background: --tint(var(--brand));
  color: #111;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .demo-fn .stage, .demo-fn .swatch { transition: none; }
}

Browser support

First browser version supporting the whole @function feature
Chrome 139
Edge 139
Firefox No
Safari No
Chrome Android 139
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

corner-shape

Limited availability, moving since August 2025

web-features The corner-shape CSS property sets the shape of an element's corners when using border-radius, allowing for shapes other than rounded corners. For example, corner-shape: squircle is a shape in between a square and rounded corner.

.demo-corner { max-width: 860px; margin-inline: auto; color: #1e1b4b; }
.demo-corner .hint { margin: 0 0 14px; color: #4b5563; }

.demo-corner .unsupported {
  display: none;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fef3c7;
  color: #78350f;
}
@supports not (corner-shape: bevel) {
  .demo-corner .unsupported { display: block; }
}

.demo-corner .cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}
.demo-corner .card {
  display: grid;
  place-content: center;
  min-height: 96px;
  padding: 8px;
  text-align: center;
  font-weight: 700;
  background: linear-gradient(135deg, #c7d2fe, #fbcfe8);
  border: 4px solid #1e1b4b;
  border-radius: 32px; /* corner-shape needs a radius to bend */
  box-shadow: 6px 6px 0 rgb(30 27 75 / 0.25);
  transition: border-radius 0.35s ease;
}
.demo-corner .card:hover { border-radius: 52px; }

/* The shape of each corner. Border, background and shadow follow it. */
.demo-corner .c-round { corner-shape: round; }
.demo-corner .c-squircle { corner-shape: squircle; }
.demo-corner .c-bevel { corner-shape: bevel; }
.demo-corner .c-scoop { corner-shape: scoop; }
.demo-corner .c-notch { corner-shape: notch; }
.demo-corner .c-mixed {
  corner-top-left-shape: bevel;
  corner-top-right-shape: scoop;
  corner-bottom-right-shape: squircle;
  corner-bottom-left-shape: notch;
}

.demo-corner .lab {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-top: 22px;
}
.demo-corner .controls { display: grid; gap: 6px; flex: 1 1 260px; }
.demo-corner .controls .read { margin: 0; font-family: ui-monospace, monospace; font-size: 0.9rem; }
.demo-corner .controls input { width: 100%; accent-color: #4f46e5; }
.demo-corner .scale { margin: 4px 0 0; color: #4b5563; font-size: 0.85rem; }
.demo-corner .swatch {
  display: grid;
  place-content: center;
  flex: 1 1 220px;
  min-height: 150px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #db2777);
  border-radius: 48px;
  corner-shape: superellipse(1.5);
  box-shadow: 8px 8px 0 rgb(30 27 75 / 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .demo-corner .card { transition: none; }
}

Browser support

First browser version supporting the whole corner-shape feature
Chrome 139
Edge 139
Firefox No
Safari No
Chrome Android 139
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

font-variant-emoji

Limited availability, moving since July 2025 Typographic font features

web-features The font-variant-emoji CSS property sets the default presentation for emoji characters.

Live preview Example from MDN
@supports (font-variant-emoji: emoji) {
  .no-support {
    display: none;
  }
  .emojis {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    font-family:
      "Noto Color Emoji", "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  }
  .emoji > div {
    font-size: 2rem;
  }
}

@supports not (font-variant-emoji: emoji) {
  .emojis {
    display: none;
  }
}

.text-presentation {
  font-variant-emoji: text;
}

.emoji-presentation {
  font-variant-emoji: emoji;
}

In the reference

The example above is MDN's example for font-variant-emoji.

Browser support

First browser version supporting the whole font-variant-emoji feature
Chrome 131
Edge 131
Firefox 141
Safari No
Chrome Android 131
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Viewport segments

Limited availability, moving since June 2025

web-features The viewport segment CSS environment variables and media features, and the viewport.segments API, allow you to adapt your layout to devices where the display is split, such as on foldable devices.

Live preview Example from MDN
abbr {
  color: #860304;
  font-weight: bold;
  transition: color 0.5s ease;
}

@media (hover: hover) {
  abbr:hover {
    color: #001ca8;
    transition-duration: 0.5s;
  }
}

@media not all and (hover: hover) {
  abbr::after {
    content: " (" attr(title) ")";
  }
}

In the reference

The example above is MDN's example for @media.

Browser support

First browser version supporting the whole Viewport segments feature
Chrome 138
Edge 138
Firefox No
Safari No
Chrome Android 138
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

if()

Limited availability, moving since May 2025 CSS

web-features The if() CSS function is an inline conditional value that returns a value based on a set of conditions.

if() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-if, .demo-if * { box-sizing: border-box; }
.demo-if { max-width: 860px; margin: 0 auto; }
.demo-if .hint { margin: 0 0 14px; }
.demo-if .unsupported { display: none; margin: 0 0 14px; padding: 10px 12px; border: 2px dashed #b45309; border-radius: 8px; background: #fffbeb; }
@supports not (width: if(media(all): 1px; else: 2px)) {
  .demo-if .unsupported { display: block; }
}

.demo-if .board { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }

.demo-if .card {
  /* if() picks a value from the first style() test that matches. */
  --accent: if(
    style(--status: done): #15803d;
    style(--status: active): #1d4ed8;
    style(--status: blocked): #b91c1c;
    else: #64748b
  );
  --wash: if(
    style(--status: done): #dcfce7;
    style(--status: active): #dbeafe;
    style(--status: blocked): #fee2e2;
    else: #f1f5f9
  );
  display: grid;
  gap: 12px;
  border-radius: 14px;
  background: var(--wash);
  border: 3px var(--accent);
  border-style: if(style(--status: blocked): dashed; else: solid);
  /* A media() test works the same way. */
  padding: if(media(width < 600px): 12px; else: 20px);
  transition: background-color 0.3s, border-color 0.3s;
}

.demo-if .name { font-size: 1.25rem; }

.demo-if .badge { justify-self: start; padding: 2px 12px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; }
.demo-if .badge::after {
  content: if(
    style(--status: done): "Done";
    style(--status: active): "In progress";
    style(--status: blocked): "Blocked";
    else: "To do"
  );
}

.demo-if .bar { height: 10px; border-radius: 5px; background: #fff; border: 1px solid #94a3b8; overflow: hidden; }
.demo-if .bar::before {
  content: "";
  display: block;
  height: 100%;
  background: var(--accent);
  width: if(style(--status: done): 100%; style(--status: active): 55%; style(--status: blocked): 30%; else: 0%);
  transition: width 0.4s;
}

.demo-if label { display: grid; gap: 4px; font-size: 0.9rem; }
.demo-if select { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid #64748b; background: #fff; color: #1b1b1b; }
.demo-if select:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .demo-if .card, .demo-if .bar::before { transition: none; }
}

Browser support

First browser version supporting the whole if() feature
Chrome 137
Edge 137
Firefox No
Safari No
Chrome Android 137
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

reading-flow

Limited availability, moving since May 2025 CSS

web-features The reading-flow CSS property sets the order in which flex or grid elements are rendered to speech or reached via focus navigation. The reading-order property overrides this order.

reading-flow Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-rf { display: grid; gap: 12px; }
.demo-rf .hint { margin: 0; color: #555; font-size: 0.9rem; }

.demo-rf .controls { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 8px 12px; border: 1px solid #c9c9d3; border-radius: 8px; }
.demo-rf .controls legend { padding: 0 6px; font-family: ui-monospace, monospace; font-size: 0.85rem; color: #444; }
.demo-rf .controls label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.demo-rf .controls input { accent-color: #0369a1; }

/* The HTML order is A to F. The layout shows them scrambled. */
.demo-rf .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "c a e"
    "f b d";
  gap: 10px;
  reading-flow: normal;
}
.demo-rf .a { grid-area: a; }
.demo-rf .b { grid-area: b; }
.demo-rf .c { grid-area: c; }
.demo-rf .d { grid-area: d; }
.demo-rf .e { grid-area: e; }
.demo-rf .f { grid-area: f; }

.demo-rf:has(#rf-rows:checked) .grid { reading-flow: grid-rows; }
.demo-rf:has(#rf-columns:checked) .grid { reading-flow: grid-columns; }
/* Keep the HTML order, but move A to the last reading group. */
.demo-rf:has(#rf-order:checked) .grid { reading-flow: source-order; }
.demo-rf:has(#rf-order:checked) .a { reading-order: 1; }

.demo-rf .grid button {
  min-height: 5.5rem;
  border: 2px solid #0369a1;
  border-radius: 12px;
  background: #e0f2fe;
  color: #0c4a6e;
  font: inherit;
  font-size: 2rem;
  font-weight: 700;
  cursor: pointer;
}
.demo-rf button:focus-visible { outline: 4px solid #e0489b; outline-offset: 2px; background: #bae6fd; }

.demo-rf .trail { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.demo-rf output { min-width: 10rem; font-family: ui-monospace, monospace; font-weight: 700; letter-spacing: 0.05em; }
.demo-rf #reset { padding: 2px 10px; border: 1px solid #888; border-radius: 6px; background: #fff; font: inherit; cursor: pointer; }

.demo-rf .unsupported { display: none; margin: 0; padding: 8px 12px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not (reading-flow: grid-rows) {
  .demo-rf .unsupported { display: block; }
}

Browser support

First browser version supporting the whole reading-flow feature
Chrome 137
Edge 137
Firefox No
Safari No
Chrome Android 137
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

::column

Limited availability, moving since April 2025 Multi-column

web-features The ::column CSS pseudo-element represents the individual columns of a multi-column layout container. Columns can only be styled with scroll snap CSS properties and can also have a ::scroll-marker pseudo-element, which scrolls to the column when activated.

Live preview Example from MDN
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Helvetica", "Arial", sans-serif;
}

ul {
  width: 100vw;
  height: 300px;
  padding: 10px;

  overflow-x: scroll;
  scroll-snap-type: x mandatory;

  columns: 1;
  text-align: center;
}

li {
  list-style-type: none;

  display: inline-block;
  height: 100%;
  width: 200px;
  text-align: left;

  background-color: #eeeeee;
  outline: 1px solid #dddddd;
  padding: 0 20px;
  margin: 0 10px;
}

li:nth-child(even) {
  background-color: cyan;
}

ul::column {
  scroll-snap-align: center;
}

In the reference

The example above is MDN's example for ::column.

Browser support

First browser version supporting the whole ::column feature
Chrome 135
Edge 135
Firefox No
Safari No
Chrome Android 135
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

::scroll-button

Limited availability, moving since April 2025 Scrolling

web-features The ::scroll-button(<dir>) CSS pseudo-element is a focusable button which scrolls its originating scroll container element in the specified direction.

::scroll-button Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.sb { max-width: 640px; margin: 0 auto; }
.sb-hint { margin: 0 0 10px; color: #44403c; font-size: 0.9rem; }

.sb .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fef3c7; color: #78350f; }
@supports not selector(::scroll-button(left)) { .sb .unsupported { display: block; } }

.sb-carousel {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  anchor-name: --sb-carousel;
}

.sb-carousel li {
  flex: 0 0 100%;
  height: 240px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  border-radius: 18px;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  scroll-snap-align: start;
}
.sb-n { font-size: 3.5rem; line-height: 1; }
.sb-carousel li:nth-child(1) { background: linear-gradient(135deg, #115e59, #0e7490); }
.sb-carousel li:nth-child(2) { background: linear-gradient(135deg, #1e293b, #64748b); }
.sb-carousel li:nth-child(3) { background: linear-gradient(135deg, #9f1239, #e11d48); }
.sb-carousel li:nth-child(4) { background: linear-gradient(135deg, #78350f, #b45309); }
.sb-carousel li:nth-child(5) { background: linear-gradient(135deg, #9a3412, #c2410c); }

/* Setting content generates the buttons; * styles all four directions at once. */
.sb-carousel::scroll-button(*) {
  position: absolute;
  position-anchor: --sb-carousel;
  align-self: anchor-center;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid rgb(255 255 255 / 0.85);
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: scale 0.15s, opacity 0.15s;
}
.sb-carousel::scroll-button(left) { content: "\2039"; left: calc(anchor(left) + 10px); }
.sb-carousel::scroll-button(right) { content: "\203A"; right: calc(anchor(right) + 10px); }

.sb-carousel::scroll-button(*):hover { scale: 1.1; }
.sb-carousel::scroll-button(*):focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px #1d4ed8; }
.sb-carousel::scroll-button(*):disabled { opacity: 0.3; cursor: default; scale: 1; }

@media (prefers-reduced-motion: reduce) {
  .sb-carousel { scroll-behavior: auto; }
  .sb-carousel::scroll-button(*) { transition: none; }
}

Browser support

First browser version supporting the whole ::scroll-button feature
Chrome 135
Edge 135
Firefox No
Safari No
Chrome Android 135
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Hyphenate limit chars

Limited availability, moving since April 2025 Text wrap

web-features The hyphenate-limit-chars CSS property sets the number of characters in a word before it is hyphenated and the minimum number of characters on either side of the hyphen.

Live preview Example from MDN
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

p {
  margin: 1rem;
  width: 120px;
  border: 2px dashed #999999;
  font-size: 1.5rem;
  hyphens: auto;
}

#ex2 {
  hyphenate-limit-chars: 14;
}

#ex3 {
  hyphenate-limit-chars: 5 9 2;
}

#ex4 {
  hyphenate-limit-chars: 5 2 7;
}

In the reference

The example above is MDN's example for hyphenate-limit-chars.

Browser support

First browser version supporting the whole Hyphenate limit chars feature
Chrome 109
Edge 109
Firefox 137
Safari No
Chrome Android 109
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

interactivity

Limited availability, moving since April 2025

web-features The interactivity: inert CSS declaration makes an element and its descendants inert, like when using the inert HTML attribute. Inert elements can't be focused or clicked, their text can't be selected or found using the browser's find-in-page feature.

Live preview Example from MDN
.inert {
  interactivity: inert;
  background-color: lightpink;
}

In the reference

The example above is MDN's example for interactivity.

Browser support

First browser version supporting the whole interactivity feature
Chrome 135
Edge 135
Firefox No
Safari No
Chrome Android 135
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Scroll markers

Limited availability, moving since April 2025 Scroll markers

web-features A scroll marker scrolls a container to a scroll target. The ::scroll-marker CSS pseudo-element selects a scroll marker in a ::scroll-marker-group pseudo-element, generated before or after the scroll container. You can use them to navigate and style tables of contents, tab panels, and carousels.

Scroll markers Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.sm { max-width: 640px; margin: 0 auto; }
.sm-hint { margin: 0 0 10px; color: #44403c; font-size: 0.9rem; }

.sm .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fef3c7; color: #78350f; }
@supports not (scroll-marker-group: after) { .sm .unsupported { display: block; } }

.sm-carousel {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* Creates the ::scroll-marker-group, placed after the slides in layout and tab order. */
  scroll-marker-group: after;
}

.sm-carousel li {
  flex: 0 0 100%;
  height: 240px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  border-radius: 18px;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  scroll-snap-align: center;
}
.sm-n { font-size: 3.5rem; line-height: 1; }
.sm-carousel li:nth-child(1) { background: linear-gradient(135deg, #4338ca, #0ea5e9); }
.sm-carousel li:nth-child(2) { background: linear-gradient(135deg, #0f766e, #06b6d4); }
.sm-carousel li:nth-child(3) { background: linear-gradient(135deg, #166534, #65a30d); }
.sm-carousel li:nth-child(4) { background: linear-gradient(135deg, #b45309, #dc2626); }
.sm-carousel li:nth-child(5) { background: linear-gradient(135deg, #1d4ed8, #7c3aed); }

.sm-carousel::scroll-marker-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-block: 14px 2px;
}

/* One marker per slide: generated by content, linked to the slide it comes from. */
.sm-carousel li::scroll-marker {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 99px;
  background: #cbd5e1;
  transition: width 0.25s, background-color 0.25s;
}
.sm-carousel li::scroll-marker:hover { background: #94a3b8; }
.sm-carousel li::scroll-marker:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }
.sm-carousel li::scroll-marker:target-current { width: 38px; background: #4338ca; }

@media (prefers-reduced-motion: reduce) {
  .sm-carousel { scroll-behavior: auto; }
  .sm-carousel li::scroll-marker { transition: none; }
}

Browser support

First browser version supporting the whole Scroll markers feature
Chrome 135
Edge 135
Firefox No
Safari No
Chrome Android 135
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

:has-slotted

Limited availability, moving since March 2025 Selectors

web-features The :has-slotted CSS pseudo-class matches <slot> elements where the fallback content is not shown. The pseudo-class matches any slotted content, including white space, text nodes, or elements.

No demo written yet and no MDN example for this feature: read its definition through the links below.

In the reference

Browser support

First browser version supporting the whole :has-slotted feature
Chrome No
Edge No
Firefox 136
Safari No
Chrome Android No
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

paint()

Limited availability, moving since March 2025 CSS

web-features The paint() CSS function creates a custom image, drawn using a paint worklet, for an element's background or border.

Live preview Example from MDN
body {
  font: 1.2em / 1.2 sans-serif;
}
li {
  background-image: paint(boxbg);
  --box-color: hsl(55 90% 60%);
}

li:nth-of-type(3n) {
  --box-color: hsl(155 90% 60%);
  --width-subtractor: 20;
}

li:nth-of-type(3n + 1) {
  --box-color: hsl(255 90% 60%);
  --width-subtractor: 40;
}

In the reference

The example above is MDN's example for paint().

Browser support

First browser version supporting the whole paint() feature
Chrome 65
Edge 79
Firefox No
Safari No
Chrome Android 65
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

scroll-initial-target

Limited availability, moving since February 2025 Scrolling

web-features The scroll-initial-target: nearest CSS declaration sets the initial scroll position of its scroll container to the top of the element, much like scrolling to a URL fragment.

Live preview Example from MDN
/* mandatory scroll-snap on parent */
div.nearest,
div.none {
  scroll-snap-type: x mandatory;
}

/* scroll-snap alignment for children */
div > div {
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.none .set,
.nearest .set.unset {
  scroll-initial-target: none;
}
.nearest .set {
  scroll-initial-target: nearest;
}

/* setup */
body {
  height: 100%;
  display: flex;
  align-items: center;
  flex-flow: column nowrap;
  font-family: sans-serif;
  text-align: center;
}

div.nearest,
div.none {
  display: flex;
  overflow: auto;
  font-size: 3rem;
}

div div {
  width: 90%;
  min-width: 15rem;
  flex: none;
  outline: 1px solid #333333;
}

/* coloration */
div > div:nth-child(even) {
  background-color: #87ea87;
}

div > div:nth-child(odd) {
  background-color: #87ccea;
}

p {
  margin: 1em 0 0;
}

@supports not (scroll-initial-target: nearest) {
  :root::before {
    content: "Your browser doesn't support the scroll-initial-target property.";
    background-color: wheat;
    display: block;
    text-align: center;
    padding: 1rem 0;
  }
}

In the reference

The example above is MDN's example for scroll-initial-target.

Browser support

First browser version supporting the whole scroll-initial-target feature
Chrome 133
Edge 133
Firefox No
Safari No
Chrome Android 133
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Device posture

Limited availability, moving since January 2025

web-features The device posture API and the device-posture CSS media feature reflect the physical posture of a device, such as whether a foldable device is folded or unfolded.

Live preview Example from MDN
abbr {
  color: #860304;
  font-weight: bold;
  transition: color 0.5s ease;
}

@media (hover: hover) {
  abbr:hover {
    color: #001ca8;
    transition-duration: 0.5s;
  }
}

@media not all and (hover: hover) {
  abbr::after {
    content: " (" attr(title) ")";
  }
}

In the reference

The example above is MDN's example for @media.

Browser support

First browser version supporting the whole Device posture feature
Chrome 132
Edge 132
Firefox No
Safari No
Chrome Android 132
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Cross-document view transitions

Limited availability, moving since December 2024 View transitions

web-features The @view-transition CSS rule sets whether a document opts-in to transitions between documents in a multi-page application. Both the old and new document must opt-in for a transition to be triggered.

No demo written yet and no MDN example for this feature: read its definition through the links below.

In the reference

Browser support

First browser version supporting the whole Cross-document view transitions feature
Chrome 126
Edge 126
Firefox No
Safari 18.2
Chrome Android 126
Safari iOS 18.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

box-decoration-break

Limited availability, moving since October 2024

web-features The box-decoration-break CSS property sets whether box decorations, such as borders or backgrounds, of an element divided across a page, column, or region wraps each fragment or splits across the break.

Live preview Example from MDN
#example-container {
  width: 14rem;
}

#example-element {
  background: linear-gradient(to bottom right, #6f6f6f, black);
  color: white;
  box-shadow:
    8px 8px 10px 0 #ff1492,
    -5px -5px 5px 0 blue,
    5px 5px 15px 0 yellow;
  padding: 0 1em;
  border-radius: 16px;
  border-style: solid;
  margin-left: 10px;
  font: 24px sans-serif;
  line-height: 2;
}

In the reference

The example above is MDN's example for box-decoration-break.

Browser support

First browser version supporting the whole box-decoration-break feature
Chrome 130
Edge 130
Firefox 32
Safari No
Chrome Android 130
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

justify-self in block layouts

Limited availability, moving since October 2024 Layout

web-features The justify-self CSS property aligns an item along a container's inline axis in block layouts, like it does in grid layouts. Likewise, the justify-items property sets a default justify-self value for all items in a container in a block layout.

Live preview Example from MDN
#example-element {
  border: 1px solid #c5c5c5;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 40px;
  grid-gap: 10px;
  width: 220px;
}

#example-element > div {
  background-color: rgb(0 0 255 / 0.2);
  border: 3px solid blue;
}

In the reference

The example above is MDN's example for justify-items.

Browser support

First browser version supporting the whole justify-self in block layouts feature
Chrome 130
Edge 130
Firefox No
Safari No
Chrome Android 130
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

calc-size()

Limited availability, moving since September 2024 CSS

web-features The calc-size() CSS function computes mathematical expressions that include height and width keyword values, for example calc-size(fit-content, size / 2). Not to be confused with the calc() CSS function, which cannot use keyword values.

calc-size() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-cs, .demo-cs * { box-sizing: border-box; }
.demo-cs { --k: 1; max-width: 860px; margin: 0 auto; }
.demo-cs .hint { margin: 0 0 12px; }
.demo-cs .unsupported { display: none; margin: 0 0 12px; padding: 10px 12px; border: 2px dashed #b45309; border-radius: 8px; background: #fffbeb; }
@supports not (height: calc-size(auto, size)) {
  .demo-cs .unsupported { display: block; }
}

.demo-cs .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 14px; }
.demo-cs .switch, .demo-cs .factor { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.demo-cs input[type="checkbox"] { width: 20px; height: 20px; accent-color: #1d4ed8; }
.demo-cs input[type="range"] { accent-color: #1d4ed8; }
.demo-cs input:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }
.demo-cs output { font-family: ui-monospace, monospace; font-size: 0.9rem; }

.demo-cs .panel {
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #dbeafe;
  box-shadow: inset 0 0 0 2px #1d4ed8;
  transition: height 0.6s ease;
}
/* calc-size() does maths on the keyword auto: the content height times the factor. */
.demo-cs:has(#open:checked) .panel { height: calc-size(auto, size * var(--k)); }
.demo-cs .inner { padding: 4px 18px 8px; }
.demo-cs .inner h3 { margin: 12px 0 0; }
.demo-cs .inner p { margin: 10px 0; }

@media (prefers-reduced-motion: reduce) {
  .demo-cs .panel { transition: none; }
}

Browser support

First browser version supporting the whole calc-size() feature
Chrome 129
Edge 129
Firefox No
Safari No
Chrome Android 129
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

interpolate-size

Limited availability, moving since September 2024 Transitions (CSS)

web-features The interpolate-size CSS property sets whether animations and transitions interpolate between a numeric value and a keyword value, such as from a fixed length to auto or fit-content.

interpolate-size Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-is, .demo-is * { box-sizing: border-box; }
.demo-is { max-width: 860px; margin: 0 auto; }
.demo-is .hint { margin: 0 0 12px; }
.demo-is .unsupported { display: none; margin: 0 0 12px; padding: 10px 12px; border: 2px dashed #b45309; border-radius: 8px; background: #fffbeb; }
@supports not (interpolate-size: allow-keywords) {
  .demo-is .unsupported { display: block; }
}

.demo-is .switch { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; font-weight: 600; cursor: pointer; }
.demo-is .switch input { width: 20px; height: 20px; accent-color: #1d4ed8; }
.demo-is .switch:has(input:focus-visible) { outline: 3px solid #1d4ed8; outline-offset: 4px; border-radius: 4px; }

.demo-is .pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: start; }
.demo-is .box { border: 2px solid #1b1b1b; border-radius: 12px; overflow: hidden; }
.demo-is .box h3 { margin: 0; padding: 12px 14px; font-size: 1rem; background: #e5e7eb; }
.demo-is .smooth h3 { background: #dbeafe; }

/* Opt in for this subtree: height may now animate between a length and a keyword such as auto. */
.demo-is .smooth { interpolate-size: allow-keywords; }
.demo-is .numeric { interpolate-size: numeric-only; }

.demo-is .panel { height: 0; overflow: hidden; transition: height 0.6s ease; }
.demo-is .inner { padding: 4px 14px 2px; }
.demo-is .inner p { margin: 10px 0; }

/* The same rule opens both panels. */
.demo-is:has(#open:checked) .panel { height: auto; }

@media (prefers-reduced-motion: reduce) {
  .demo-is .panel { transition: none; }
}

Browser support

First browser version supporting the whole interpolate-size feature
Chrome 129
Edge 129
Firefox No
Safari No
Chrome Android 129
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

display animation

Limited availability, moving since September 2024 CSS

web-features You can animate elements between display: none and any other display value or animate between content-visibility: hidden and any other content-visibility value. This also applies to transitions.

display animation Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-display { max-width: 52rem; margin: 0 auto; }

.demo-display .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fef3c7; color: #78350f; }
@supports not (transition-behavior: allow-discrete) {
  .demo-display .unsupported { display: block; }
}

.demo-display .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.demo-display .col { min-height: 270px; padding: 14px 16px; border-radius: 16px; background: #f1f5f9; }
.demo-display h2 { margin: 0 0 12px; font-size: 1rem; color: #334155; }

.demo-display button { font: inherit; font-weight: 600; padding: 8px 16px; border: 0; border-radius: 999px; background: #4f46e5; color: #fff; cursor: pointer; }
.demo-display button:hover { background: #4338ca; }
.demo-display button.ghost { background: #e0e7ff; color: #3730a3; }
.demo-display button:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 2px; }

/* display: a notice leaves with a fade, then really goes to display: none. */
.demo-display .toasts { margin: 0 0 6px; padding: 0; list-style: none; }
.demo-display .toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 52px;
  margin-bottom: 8px;
  padding: 0 12px 0 16px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 4px rgb(15 23 42 / 0.15);
  transition: opacity 0.45s, translate 0.45s, height 0.45s, margin-bottom 0.45s, display 0.45s allow-discrete;

  @starting-style {
    opacity: 0;
    translate: -40px 0;
    height: 0;
    margin-bottom: 0;
  }
}
.demo-display .toast.gone {
  display: none;
  opacity: 0;
  translate: 60px 0;
  height: 0;
  margin-bottom: 0;
}
.demo-display .toast button { padding: 5px 12px; font-size: 0.85rem; background: #e0e7ff; color: #3730a3; }

/* content-visibility is discrete too: the menu stays rendered until its fade is over. */
.demo-display .menu-wrap { position: relative; }
.demo-display .menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: flex;
  flex-direction: column;
  width: min(14rem, 100%);
  padding: 6px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgb(15 23 42 / 0.25);
  content-visibility: hidden;
  opacity: 0;
  translate: 0 -10px;
  scale: 0.96;
  transform-origin: top left;
  pointer-events: none;
  transition: opacity 0.35s, translate 0.35s, scale 0.35s, content-visibility 0.35s allow-discrete;
}
.demo-display .menu.open {
  content-visibility: visible;
  opacity: 1;
  translate: 0 0;
  scale: 1;
  pointer-events: auto;
}
.demo-display .menu button { text-align: left; padding: 9px 12px; border-radius: 8px; background: transparent; color: #1e293b; font-weight: 500; }
.demo-display .menu button:hover { background: #eef2ff; }

@media (prefers-reduced-motion: reduce) {
  .demo-display .toast,
  .demo-display .menu { transition-duration: 0.01s; }
}

Browser support

First browser version supporting the whole display animation feature
Chrome 117
Edge 117
Firefox No
Safari 18
Chrome Android 117
Safari iOS 18

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

text-spacing-trim

Limited availability, moving since March 2024 CSS

web-features The text-spacing-trim CSS property controls spacing around CJK characters, avoiding excessive whitespace when using full-width punctuation characters.

Live preview Example from MDN
main {
  font-family:
    "Yu Gothic", "YuGothic", "Noto Sans JP", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", sans-serif;
  display: grid;
  gap: 0.5em;
  grid-template-columns: 1fr 1fr;
  width: 70%;
  margin: 0 auto;
}
h2 {
  font-size: 80%;
  margin: 0;
}
p {
  font-size: 20px;
  border: 1px solid blue;
  margin: 0;
}
#normal {
  text-spacing-trim: normal;
  grid-column: 1;
  grid-row: 1;
}
#space-all {
  text-spacing-trim: space-all;
  grid-column: 2;
  grid-row: 1;
}
#space-first {
  text-spacing-trim: space-first;
  grid-column: 1;
  grid-row: 2;
}
#trim-start {
  text-spacing-trim: trim-start;
  grid-column: 2;
  grid-row: 2;
}

In the reference

The example above is MDN's example for text-spacing-trim.

Browser support

First browser version supporting the whole text-spacing-trim feature
Chrome 123
Edge 123
Firefox No
Safari No
Chrome Android 123
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

::spelling-error and ::grammar-error

Limited availability, moving since March 2024 Selectors

web-features The ::spelling-error and ::grammar-error CSS pseudo-elements match text that is highlighted as misspelled and grammatically incorrect, respectively.

Live preview Example from MDN
::grammar-error {
  text-decoration: underline red;
  color: red;
}

In the reference

The example above is MDN's example for ::grammar-error.

Browser support

First browser version supporting the whole ::spelling-error and ::grammar-error feature
Chrome 121
Edge 121
Firefox No
Safari 17.4
Chrome Android 121
Safari iOS 17.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

display: ruby

Limited availability, moving since January 2024 CSS

web-features The display: ruby CSS declaration renders an element with the box layout of a <ruby> HTML element. Child elements may use equivalents to <ruby> internal elements such as display: ruby-base for <rb>.

Live preview Example from MDN
.example-container {
  width: 100%;
  height: 100%;
}

code {
  background: #88888888;
}

#example-element {
  border: 3px dashed orange;
}

.child {
  display: inline-block;
  padding: 0.5em 1em;
  background-color: #ccccff;
  border: 1px solid #ababab;
  color: black;
}

In the reference

The example above is MDN's example for display.

Browser support

First browser version supporting the whole display: ruby feature
Chrome No
Edge No
Firefox 88
Safari No
Chrome Android No
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

font-palette animation

Limited availability, moving since January 2024 Fonts

web-features You can animate color fonts between two font-palette values.

font-palette animation Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

/* Palettes of the "Block Color" font: 0 is sunset, 1 is ocean. override-colors paints a third one. */
@font-palette-values --sunset {
  font-family: "Block Color";
  base-palette: 0;
}
@font-palette-values --ocean {
  font-family: "Block Color";
  base-palette: 1;
}
@font-palette-values --mint {
  font-family: "Block Color";
  override-colors: 0 #064e3b, 1 #34d399, 2 #d1fae5;
}

/* font-palette is animatable: the colours of the glyphs blend between keyframes. */
@keyframes cycle {
  0%, 100% { font-palette: --sunset; }
  33% { font-palette: --ocean; }
  66% { font-palette: --mint; }
}

.demo-palette { --accent: #4f46e5; --mix: 40; max-width: 46rem; margin-inline: auto; }
.demo-palette .hint { margin: 0 0 10px; color: #555; font-size: 0.9rem; }
.demo-palette .card { margin: 0 0 12px; padding: 12px 18px 14px; border-radius: 14px; background: #0f172a; color: #e2e8f0; }

.demo-palette .title { margin: 0; font-family: "Block Color", system-ui, sans-serif; font-size: clamp(2.6rem, 11vw, 5rem); font-weight: 400; line-height: 1.1; color: #e2e8f0; }
.demo-palette .animated { font-palette: --sunset; animation: cycle 6s linear infinite; }
.demo-palette .animated:hover { animation-play-state: paused; }
.demo-palette .mixed { font-palette: palette-mix(in oklch, --ocean calc(var(--mix) * 1%), --sunset); }

.demo-palette .caption { margin: 4px 0 0; color: #94a3b8; font-size: 0.85rem; }
.demo-palette .slider { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 0; }
.demo-palette .slider label { font-size: 0.9rem; }
.demo-palette .slider input { flex: 1 1 8rem; accent-color: #38bdf8; }
.demo-palette .slider input:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { .demo-palette .animated { animation: none; } }

.demo-palette .unsupported,
.demo-palette .nofont { display: none; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #78350f; }
.demo-palette.no-font .nofont { display: block; }
@supports not (font-palette: --sunset) {
  .demo-palette .unsupported { display: block; }
}

Browser support

First browser version supporting the whole font-palette animation feature
Chrome 121
Edge 121
Firefox No
Safari No
Chrome Android 121
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

page-orientation

Limited availability, moving since January 2024 Layout

web-features The page-orientation CSS property sets the rotation of a page after pagination. This allows pages with the same size declaration to display with different orientations.

Live preview Example from MDN
@page {
  size: landscape;
  margin: 2cm;
}

section {
  page-break-after: always;
  break-after: page;
}

@media print {
  button {
    display: none;
  }
}

body {
  font-family: "Helvetica", sans-serif;
  background-color: silver;
}

article {
  width: 100%;
}

section {
  display: grid;
  background-color: white;
  border-radius: 0.6rem;
  justify-items: center;
  padding: 1rem;
  width: 50%;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
  margin: 0 auto;
  margin-block-end: 1rem;
  border: 1px dashed;
}

In the reference

The example above is MDN's example for @page.

Browser support

First browser version supporting the whole page-orientation feature
Chrome 85
Edge 85
Firefox 122
Safari No
Chrome Android 85
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

mask-border

Limited availability, moving since December 2023 Clipping, shapes, and masking

web-features The mask-border CSS property sets how the edges of an element are masked. It is a shorthand for mask-border-outset, mask-border-repeat, mask-border-slice, mask-border-source, and mask-border-width.

Live preview Example from MDN
.masked {
  width: 200px;
  background-color: lavender;
  border: 18px solid salmon;
  padding: 10px;

  -webkit-mask-box-image: url("https://mdn.github.io/shared-assets/images/examples/mask-border-diamonds.png")
    30 fill /          /* slice */
    20px /             /* width */
    1px                /* outset */
    round;             /* repeat */

  mask-border:
    url("https://mdn.github.io/shared-assets/images/examples/mask-border-diamonds.png")
    30 fill /        /* slice */
    20px /           /* width */
    1px              /* outset */
    round;           /* repeat */
}

In the reference

The example above is MDN's example for mask-border.

Browser support

First browser version supporting the whole mask-border feature
Chrome No
Edge No
Firefox No
Safari 17.2
Chrome Android No
Safari iOS 17.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Numeric factory functions

Limited availability, moving since December 2023 CSS object models

web-features The numeric factory functions, such as CSS.px() or CSS.kHz(), return a CSSUnitValue representing a CSS number value (as in 12px or 440kHz).

No demo written yet and no MDN example for this feature: read its definition through the links below.

Browser support

First browser version supporting the whole Numeric factory functions feature
Chrome 66
Edge 79
Firefox No
Safari 16.4
Chrome Android 66
Safari iOS 16.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

background-clip: text

Limited availability, moving since December 2023 Background

web-features The background-clip: text CSS declaration draws the background underneath only the text in the element.

background-clip: text Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-text {
  --grad: linear-gradient(90deg, #ff3d81, #ffb100, #22d3ee, #8b5cf6, #ff3d81);
  max-width: 860px;
  margin-inline: auto;
}
.demo-text:has(#g-sunset:checked) { --grad: linear-gradient(90deg, #f97316, #e11d48, #7c3aed, #f97316); }
.demo-text:has(#g-ocean:checked) { --grad: linear-gradient(90deg, #0ea5e9, #14b8a6, #3b82f6, #0ea5e9); }
.demo-text:has(#g-stripes:checked) { --grad: repeating-linear-gradient(45deg, #111827 0 12px, #f59e0b 12px 24px); }

.demo-text .unsupported {
  display: none;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fef3c7;
  color: #78350f;
}
@supports not (background-clip: text) {
  .demo-text .unsupported { display: block; }
}

.demo-text .headline {
  margin: 0.2em 0 0.3em;
  padding-block-end: 0.12em; /* the background stops at the box: leave room for descenders */
  font: 900 clamp(2.2rem, 9vw, 4.6rem) / 1.05 system-ui, sans-serif;
  overflow-wrap: anywhere;
  color: #be185d; /* solid fallback, replaced below */
}

/* The background is painted only where the glyphs are. The text itself
   becomes transparent so the gradient shows through. */
@supports (background-clip: text) {
  .demo-text .headline {
    background: var(--grad);
    background-size: 200% 100%;
    background-clip: text;
    color: transparent;
    animation: demo-text-flow 6s linear infinite;
  }
}
@keyframes demo-text-flow {
  to { background-position: 200% 0; }
}

.demo-text .presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0 0 14px;
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}
.demo-text .presets legend { padding: 0 6px; font-size: 0.85rem; color: #4b5563; }
.demo-text .presets input { margin: 0; accent-color: #4f46e5; }
.demo-text .presets label { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; }

.demo-text .field { display: grid; gap: 4px; margin: 0; max-width: 420px; }
.demo-text .field input { padding: 8px 10px; font: inherit; border: 1px solid #9ca3af; border-radius: 8px; }
.demo-text .field input:focus-visible { outline: 3px solid #4f46e5; outline-offset: 1px; }

@media (prefers-reduced-motion: reduce) {
  .demo-text .headline { animation: none; }
}

Browser support

First browser version supporting the whole background-clip: text feature
Chrome 120
Edge 120
Firefox No
Safari 14
Chrome Android 120
Safari iOS 14

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

prefers-reduced-transparency media query

Limited availability, moving since October 2023 Media queries

web-features The prefers-reduced-transparency CSS media query sets styles based on whether the user prefers to reduce the amount of transparent effects on their device, for example to improve contrast and legibility.

Live preview Example from MDN
abbr {
  color: #860304;
  font-weight: bold;
  transition: color 0.5s ease;
}

@media (hover: hover) {
  abbr:hover {
    color: #001ca8;
    transition-duration: 0.5s;
  }
}

@media not all and (hover: hover) {
  abbr::after {
    content: " (" attr(title) ")";
  }
}

In the reference

The example above is MDN's example for @media.

Browser support

First browser version supporting the whole prefers-reduced-transparency media query feature
Chrome 119
Edge 119
Firefox No
Safari No
Chrome Android 119
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

word-break: auto-phrase

Limited availability, moving since October 2023 Text wrap

web-features The word-break: auto-phrase CSS declaration specifies that wrapping should occur at natural phrase boundaries, especially in CJK languages.

Live preview Example from MDN
#example-element {
  width: 80%;
  padding: 20px;
  text-align: start;
  border: solid 1px darkgray;
}

In the reference

The example above is MDN's example for word-break.

Browser support

First browser version supporting the whole word-break: auto-phrase feature
Chrome 119
Edge 119
Firefox No
Safari No
Chrome Android 119
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

resize (CSS property)

Limited availability, moving since October 2023 CSS

web-features The resize CSS property sets whether an element can be resized by the user, and on which axes.

Live preview Example from MDN
#example-element {
  background: linear-gradient(135deg, cyan 0%, cyan 94%, white 95%);
  border: 3px solid #c5c5c5;
  overflow: auto;
  width: 250px;
  height: 250px;
  font-weight: bold;
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

In the reference

The example above is MDN's example for resize.

Browser support

First browser version supporting the whole resize (CSS property) feature
Chrome 4
Edge 79
Firefox 5
Safari 4
Chrome Android 18
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

font-synthesis-position

Limited availability, moving since September 2023 Font synthesis

web-features The font-synthesis-position CSS property sets whether or not the browser should synthesize subscript and superscript typefaces when they're missing from the font.

Live preview Example from MDN
@import "https://fonts.googleapis.com/css2?family=Montserrat&display=swap";

* {
  font-family: "Montserrat", sans-serif;
}
.super {
  font-variant-position: super;
}
.sub {
  font-variant-position: sub;
}
.no-syn {
  font-synthesis-position: none;
}

In the reference

The example above is MDN's example for font-synthesis-position.

Browser support

First browser version supporting the whole font-synthesis-position feature
Chrome No
Edge No
Firefox 118
Safari No
Chrome Android No
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

font-variant-position

Limited availability, moving since September 2023 Typographic font features

web-features The font-variant-position CSS property sets whether to use alternate glyphs for subscript and superscript text.

Live preview Example from MDN
p {
  display: inline;
}

.normal {
  font-variant-position: normal;
}

.super {
  font-variant-position: super;
}

.sub {
  font-variant-position: sub;
}

In the reference

The example above is MDN's example for font-variant-position.

Browser support

First browser version supporting the whole font-variant-position feature
Chrome No
Edge No
Firefox 34
Safari No
Chrome Android No
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

overlay

Limited availability, moving since September 2023 CSS

web-features The overlay CSS property, used as an allow-discrete CSS transition, prevents a top layer element, such as a popover or a <dialog>, from being removed from the top layer before it has finished animating. You can't set the value of the overlay property; only use it as transition property.

Live preview Example from MDN
html {
  font-family: "Helvetica", "Arial", sans-serif;
}

[popover]:popover-open {
  opacity: 1;
  transform: scaleX(1);
}

[popover] {
  font-size: 1.2rem;
  padding: 10px;

  /* Final state of the exit animation */
  opacity: 0;
  transform: scaleX(0);

  transition:
    opacity 0.7s,
    transform 0.7s,
    overlay 0.7s allow-discrete,
    display 0.7s allow-discrete;
  /* Equivalent to
  transition: all 0.7s allow-discrete; */
}

/* Needs to be included after the previous [popover]:popover-open
   rule to take effect, as the specificity is the same */
@starting-style {
  [popover]:popover-open {
    opacity: 0;
    transform: scaleX(0);
  }
}

/* Transition for the popover's backdrop */

[popover]::backdrop {
  background-color: transparent;
  transition:
    display 0.7s allow-discrete,
    overlay 0.7s allow-discrete,
    background-color 0.7s;
  /* Equivalent to
  transition: all 0.7s allow-discrete; */
}

[popover]:popover-open::backdrop {
  background-color: rgb(0 0 0 / 25%);
}

/* Nesting selectors (&) cannot represent pseudo-elements, so this 
   starting-style rule cannot be nested. */

@starting-style {
  [popover]:popover-open::backdrop {
    background-color: transparent;
  }
}

In the reference

The example above is MDN's example for overlay.

Browser support

First browser version supporting the whole overlay feature
Chrome 117
Edge 117
Firefox No
Safari No
Chrome Android 117
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Page selectors

Limited availability, moving since August 2023 Selectors

web-features The :first, :left, and :right pseudo-classes select pages based on their position in sequence after pagination.

Live preview Example from MDN
@page :first {
  size: 8.5in 11in;
  margin-left: 3in;
  margin-top: 5in;
}

p {
  page-break-after: always;
  font: 1.2em sans-serif;
}

In the reference

The example above is MDN's example for :first.

Browser support

First browser version supporting the whole Page selectors feature
Chrome 18
Edge 12
Firefox No
Safari 6
Chrome Android 18
Safari iOS 6

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

baseline-source

Limited availability, moving since July 2023

web-features The baseline-source CSS property controls how inline-level boxes with multiple lines of text are aligned with the surrounding text. By default, which typographic baseline is used depends on the display property value.

Live preview Example from MDN
body {
  font-family: sans-serif;
}

.box {
  border: 2px solid #888888;
  width: 50px;
}

span {
  padding: 0.4rem;
}

.box {
  display: inline-flex;
  flex-direction: column;
}

.first {
  baseline-source: first;
}

.auto {
  baseline-source: auto;
}

.last {
  baseline-source: last;
}

In the reference

The example above is MDN's example for baseline-source.

Browser support

First browser version supporting the whole baseline-source feature
Chrome 111
Edge 111
Firefox 115
Safari No
Chrome Android 111
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

CSS typed object model

Limited availability, moving since March 2023 CSS object models

web-features The CSSStyleValue and its subclasses represent CSS values as distinct types instead of only strings. Also known as typed OM.

No demo written yet and no MDN example for this feature: read its definition through the links below.

Browser support

First browser version supporting the whole CSS typed object model feature
Chrome 66
Edge 79
Firefox No
Safari 16.4
Chrome Android 66
Safari iOS 16.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

:autofill

Limited availability, moving since February 2023 Forms

web-features The :autofill pseudo-class matches <input> elements that have been filled in automatically by the browser.

Live preview Example from MDN
input {
  border: 3px solid black;
}
input:autofill {
  outline: 5px solid magenta;
  border: 3px dashed yellow;
}

In the reference

The example above is MDN's example for :autofill.

Browser support

First browser version supporting the whole :autofill feature
Chrome 110
Edge 110
Firefox No
Safari 15
Chrome Android 110
Safari iOS 15

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

initial-letter

Limited availability, moving since February 2023 CSS

web-features The initial-letter CSS property sets the number of lines the first letter of an element occupies. You can use the property to make a raised capital or drop cap.

Live preview Example from MDN
.normal::first-letter {
  -webkit-initial-letter: normal;
  initial-letter: normal;
}

.onefive::first-letter {
  -webkit-initial-letter: 1.5;
  initial-letter: 1.5;
}

.three::first-letter {
  -webkit-initial-letter: 3;
  initial-letter: 3;
}

p {
  outline: 1px dashed red;
}

In the reference

The example above is MDN's example for initial-letter.

Browser support

First browser version supporting the whole initial-letter feature
Chrome 110
Edge 110
Firefox No
Safari No
Chrome Android 110
Safari iOS No

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Widely available since 2023

Baseline widely available: supported across browsers for at least 30 months. Use freely.

align-content in block layouts

Widely available since October 2026 Layout

web-features The align-content property vertically aligns content in block layouts, like it does in flex or grid layouts.

align-content in block layouts Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-ac { display: grid; gap: 12px; }
.demo-ac .hint { margin: 0; color: #555; font-size: 0.9rem; }

.demo-ac .controls { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 8px 12px; border: 1px solid #c9c9d3; border-radius: 8px; }
.demo-ac .controls legend { padding: 0 6px; font-family: ui-monospace, monospace; font-size: 0.85rem; color: #444; }
.demo-ac .controls label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.demo-ac .controls input { accent-color: #c2410c; }
.demo-ac .controls input:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

/* A block container (display: block), not flex or grid. */
.demo-ac .box {
  --ac: center;
  display: block;
  box-sizing: border-box;
  height: 16rem;
  min-height: 9rem;
  max-height: 24rem;
  resize: vertical;
  overflow: auto;
  padding: 12px 20px;
  border: 2px solid #c2410c;
  border-radius: 12px;
  background: repeating-linear-gradient(#fff7ed 0 24px, #ffedd5 24px 48px);
  align-content: var(--ac);
}
.demo-ac:has(#ac-start:checked) .box { --ac: start; }
.demo-ac:has(#ac-end:checked) .box { --ac: end; }
.demo-ac .box h2 { margin: 0 0 4px; font-size: 1.2rem; }
.demo-ac .box p { margin: 0; }
.demo-ac code { padding: 0 4px; border-radius: 4px; background: #fed7aa; }

.demo-ac .unsupported { display: none; margin: 0; padding: 8px 12px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
.demo-ac .unsupported[data-off] { display: block; }
@supports not (align-content: center) {
  .demo-ac .unsupported { display: block; }
}

Browser support

First browser version supporting the whole align-content in block layouts feature
Chrome 123
Edge 123
Firefox 125
Safari 17.4
Chrome Android 123
Safari iOS 17.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

transform-box

Widely available since October 2026

web-features The transform-box CSS property sets the position and dimensions of the reference box relative to which an element's transformations are calculated.

Live preview Example from MDN
svg {
  width: 80vh;
  border: 1px solid #d9d9d9;
  position: absolute;
  margin: auto;
  inset: 0;
}

#box {
  transform-origin: 50% 50%; /* anything other than `0 0` to see the effect */
  transform-box: fill-box;
  animation: rotate-box 3s linear infinite;
}

@keyframes rotate-box {
  to {
    transform: rotate(360deg);
  }
}

In the reference

The example above is MDN's example for transform-box.

Browser support

First browser version supporting the whole transform-box feature
Chrome 118
Edge 118
Firefox 125
Safari 13.1
Chrome Android 118
Safari iOS 13.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

paint-order

Widely available since September 2026 CSS

web-features The paint-order CSS property sets the z-order of strokes, fills, and (in SVG content) markers. For example, paint-order: markers stroke fill; draws the markers, then stroke on top of markers, then fill on top of both markers and stroke.

paint-order Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-paint { --w: 14; max-width: 860px; margin-inline: auto; color: #1b1b1b; }

.demo-paint .unsupported {
  display: none;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fef3c7;
  color: #78350f;
}
@supports not (paint-order: stroke fill) {
  .demo-paint .unsupported { display: block; }
}

.demo-paint .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 14px; }
.demo-paint .controls input { flex: 1 1 200px; max-width: 360px; accent-color: #4f46e5; }

.demo-paint .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.demo-paint figure { margin: 0; }
.demo-paint figcaption { margin-top: 4px; font-size: 0.85rem; }
.demo-paint code { font-weight: 700; color: #4338ca; }

.demo-paint .cell {
  display: grid;
  place-items: center;
  min-height: 130px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #ec4899 60%, #6366f1);
}
.demo-paint svg { display: block; width: 100%; }
.demo-paint text {
  font: 900 88px system-ui, sans-serif;
  fill: #fff;
  stroke: #1e1b4b;
  stroke-width: calc(var(--w) * 1px);
  stroke-linejoin: round;
}
/* HTML text has no stroke property of its own: the prefixed one is the only way. */
.demo-paint .html {
  margin: 0;
  font: 900 88px / 1.3 system-ui, sans-serif;
  color: #fff;
  -webkit-text-stroke: calc(var(--w) * 1px) #1e1b4b;
}

/* Stroke first, fill on top: the stroke becomes a clean outline around full letters. */
.demo-paint .first text,
.demo-paint .first .html { paint-order: stroke fill; }

Browser support

First browser version supporting the whole paint-order feature
Chrome 123
Edge 123
Firefox ≤66
Safari ≤12
Chrome Android 123
Safari iOS ≤12

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

white-space-collapse

Widely available since September 2026 White space

web-features The white-space-collapse CSS property sets whether new line characters are shown as line breaks, and whether multiple consecutive spaces are all displayed or combined.

white-space-collapse Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-wsc { --accent: #4f46e5; max-width: 54rem; margin-inline: auto; }
.demo-wsc .field { display: grid; gap: 4px; margin: 0 0 12px; }
.demo-wsc label { color: #475569; font-size: 0.9rem; }
.demo-wsc textarea { box-sizing: border-box; width: 100%; padding: 8px 10px; font: 0.85rem/1.4 ui-monospace, monospace; border: 1px solid #94a3b8; border-radius: 10px; resize: vertical; }
.demo-wsc textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.demo-wsc .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 10px; }
.demo-wsc .box { min-width: 0; }
.demo-wsc h2 { margin: 0 0 4px; color: var(--accent); font: 0.8rem ui-monospace, monospace; overflow-wrap: anywhere; }

/* Monospace with a one-character grid behind it, so every preserved space is visible. */
.demo-wsc .out {
  box-sizing: border-box;
  height: 11.5rem;
  padding: 6px;
  overflow: auto;
  font: 0.85rem/1.4 ui-monospace, monospace;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: repeating-linear-gradient(to right, #eef2ff 0 1ch, #fff 1ch 2ch);
  background-origin: content-box;
}

.demo-wsc .collapse { white-space-collapse: collapse; }
.demo-wsc .preserve { white-space-collapse: preserve; }
.demo-wsc .preserve-breaks { white-space-collapse: preserve-breaks; }
.demo-wsc .preserve-spaces { white-space-collapse: preserve-spaces; }
.demo-wsc .break-spaces { white-space-collapse: break-spaces; }

.demo-wsc .unsupported { display: none; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #78350f; }
@supports not (white-space-collapse: preserve) {
  .demo-wsc .unsupported { display: block; }
}

Browser support

First browser version supporting the whole white-space-collapse feature
Chrome 114
Edge 114
Firefox 124
Safari 17.4
Chrome Android 114
Safari iOS 17.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

rect() and xywh()

Widely available since July 2026 Clipping, shapes, and masking

web-features The rect() CSS function creates a rectangle shape with insets from the edges of an element. The xywh() CSS function creates a rectangle shifted by an x and y distance. They can be used with clip-path and shape-outside.

rect() and xywh() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-rect { max-width: 860px; margin-inline: auto; color: #1b1b1b; }
.demo-rect .hint { margin: 0 0 14px; color: #4b5563; }

.demo-rect .unsupported {
  display: none;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fef3c7;
  color: #78350f;
}
@supports not (clip-path: xywh(0 0 10px 10px)) {
  .demo-rect .unsupported { display: block; }
}

.demo-rect .trio { display: flex; flex-wrap: wrap; gap: 20px; }
.demo-rect figure { margin: 0; width: 240px; max-width: 100%; }
.demo-rect figcaption { margin-top: 8px; font-size: 0.85rem; line-height: 1.4; }
.demo-rect code { display: block; font-weight: 700; color: #4338ca; }

.demo-rect .frame {
  width: 220px;
  height: 150px;
  max-width: 100%;
  border: 1px dashed #6b7280;
  background: repeating-conic-gradient(#e5e7eb 0 25%, #fff 0 50%) 0 0 / 16px 16px;
}
.demo-rect .scene {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 72% 34%, #fff7c2 0 11%, #fbbf24 12% 17%, transparent 18%),
    linear-gradient(transparent 68%, #166534 68%),
    linear-gradient(#1e3a8a, #ec4899 75%);
  transition: clip-path 0.6s ease;
}

/* Same rectangle three ways, with the same rounded corners. */
.demo-rect .s-inset { clip-path: inset(20px 40px 30px 20px round 14px); }
.demo-rect .s-rect { clip-path: rect(20px 180px 120px 20px round 14px); }
.demo-rect .s-xywh { clip-path: xywh(20px 20px 160px 100px round 14px); }

/* Reveal: each syntax animates to the full box in its own terms. auto in
   rect() means the edge of the box: 0 for top and left, 100% for the others. */
.demo-rect .s-inset:hover,
.demo-rect:has(#full:checked) .s-inset { clip-path: inset(0 0 0 0 round 0); }
.demo-rect .s-rect:hover,
.demo-rect:has(#full:checked) .s-rect { clip-path: rect(auto auto auto auto round 0); }
.demo-rect .s-xywh:hover,
.demo-rect:has(#full:checked) .s-xywh { clip-path: xywh(0 0 100% 100% round 0); }

.demo-rect .reveal { margin: 18px 0 0; display: flex; gap: 8px; align-items: center; }
.demo-rect .reveal input { width: 1.1rem; height: 1.1rem; accent-color: #4f46e5; }

@media (prefers-reduced-motion: reduce) {
  .demo-rect .scene { transition: none; }
}

Browser support

First browser version supporting the whole rect() and xywh() feature
Chrome 119
Edge 119
Firefox 122
Safari 17.2
Chrome Android 119
Safari iOS 17.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

:has()

Widely available since June 2026 Selectors

web-features The :has() CSS functional pseudo-class matches an element if any of the selectors passed as parameters would match at least one element.

:has() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-has {
  --ink: #1b1b1b;
  --muted: #5b5b66;
  --paper: #ffffff;
  --line: #d4d4dc;
  --accent: #6d28d9;
  --tint: #f3edff;
}

.demo-has .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not selector(:has(a)) {
  .demo-has .unsupported { display: block; }
}

.demo-has .panel {
  counter-reset: picked; /* every ticked card adds 1, see .summary */
  max-width: 44rem;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

/* The parent reacts to a child it contains: a switch deep inside re-themes the whole panel. */
.demo-has .panel:has(#dark:checked) {
  --ink: #f1eefc;
  --muted: #b9b4d4;
  --paper: #17132e;
  --line: #3d3669;
  --accent: #b69cff;
  --tint: #2a2255;
}

.demo-has header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.demo-has h2 { margin: 0; font-size: 1.15rem; }
.demo-has .switch { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; }
.demo-has input { accent-color: var(--accent); width: 1.1rem; height: 1.1rem; margin: 0; }

.demo-has .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 12px;
  margin: 16px 0;
  padding: 12px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  transition: border-color 0.2s, background 0.2s;
}
/* The fieldset itself changes as soon as ANY card inside it is ticked. */
.demo-has .grid:has(:checked) { border-style: solid; border-color: var(--accent); }

.demo-has .card {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 12px 40px 12px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.demo-has .card input { position: absolute; top: 12px; right: 12px; }
.demo-has .title { font-weight: 700; }
.demo-has .sub { color: var(--muted); font-size: 0.875rem; }
.demo-has .card:hover { transform: translateY(-2px); }

.demo-has .card:has(:checked) {
  border-color: var(--accent);
  background: var(--tint);
  box-shadow: 0 6px 18px -8px var(--accent);
  counter-increment: picked;
}
.demo-has .card:has(:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

.demo-has .summary { margin: 0 0 14px; color: var(--muted); }
.demo-has .some { display: none; color: var(--ink); font-weight: 600; }
.demo-has .some::before { content: counter(picked) " of 4 selected"; }
.demo-has .panel:has(.card :checked) .none { display: none; }
.demo-has .panel:has(.card :checked) .some { display: inline; }

.demo-has button {
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.demo-has button:focus-visible, .demo-has .switch:has(:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Nothing ticked: the button has nothing to clear. */
.demo-has .panel:not(:has(.card :checked)) button { opacity: 0.45; }

.demo-has .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (prefers-reduced-motion: reduce) {
  .demo-has .panel, .demo-has .grid, .demo-has .card { transition: none; }
  .demo-has .card:hover { transform: none; }
}

Browser support

First browser version supporting the whole :has() feature
Chrome 105
Edge 105
Firefox 121
Safari 15.4
Chrome Android 105
Safari iOS 15.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

cap unit

Widely available since June 2026 Units

web-features The cap CSS length unit corresponds to the height of Latin capital letters.

cap unit Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-cap {
  --accent: #4f46e5;
  --face: system-ui, sans-serif;
  --size: 32px;
  --outline: 1px dashed #db2777;
  max-width: 46rem;
  margin-inline: auto;
}
.demo-cap:has(#f-serif:checked) { --face: Georgia, "Times New Roman", "Liberation Serif", serif; }
.demo-cap:has(#f-mono:checked) { --face: ui-monospace, "DejaVu Sans Mono", monospace; }
.demo-cap:not(:has(#guides:checked)) { --outline: 1px solid transparent; }

.demo-cap .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 12px; }
.demo-cap fieldset { display: flex; gap: 4px 14px; margin: 0; padding: 4px 12px 8px; border: 1px solid #cbd5e1; border-radius: 10px; }
.demo-cap legend { padding-inline: 4px; font-size: 0.85rem; color: #475569; }
.demo-cap label { cursor: pointer; }
.demo-cap input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.demo-cap .stage { display: grid; gap: 12px; }
.demo-cap .row { padding: 8px 16px 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.demo-cap .row h2 { margin: 0 0 6px; color: var(--accent); font: 0.8rem ui-monospace, monospace; }
.demo-cap .labels { margin: 0; font-family: var(--face); font-size: var(--size); font-weight: 700; line-height: 2; }

.demo-cap .tag { display: inline-block; margin-right: 0.5em; padding: 0 0.5em; border-radius: 0.3em; background: #e0e7ff; color: #312e81; line-height: 1.5; letter-spacing: 0.04em; }

/* An inline SVG sits on the baseline. Its height in cap makes it exactly as tall as a capital letter, in any font and at any size. */
.demo-cap svg { display: inline; margin-right: 0.4em; fill: currentColor; outline: var(--outline); }
.demo-cap .em svg { width: 1em; height: 1em; }
.demo-cap .cap svg { width: 1cap; height: 1cap; }

.demo-cap .unsupported { display: none; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #78350f; }
@supports not (height: 1cap) {
  .demo-cap .unsupported { display: block; }
  .demo-cap .cap svg { width: 0.7em; height: 0.7em; }
}
/* A <length> unit: cap is the height of a capital letter in the current font. */

Browser support

First browser version supporting the whole cap unit feature
Chrome 118
Edge 118
Firefox 97
Safari 17.2
Chrome Android 118
Safari iOS 17.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

counter-set

Widely available since June 2026 Counters

web-features The counter-set CSS property creates (and optionally sets a value for) a counter, the numbers for a series of headings or ordered list items.

Live preview Example from MDN
#default-example {
  text-align: left;
  counter-set: chapter-count;
}

#example-element {
  background-color: #37077c;
  color: white;
}

h2 {
  counter-increment: chapter-count;
  font-size: 1em;
}

h2::before {
  content: "Chapter " counter(chapter-count) ": ";
}

In the reference

The example above is MDN's example for counter-set.

Browser support

First browser version supporting the whole counter-set feature
Chrome 85
Edge 85
Firefox 68
Safari 17.2
Chrome Android 85
Safari iOS 17.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

linear() easing

Widely available since June 2026 CSS

web-features The linear() easing function for animations and transitions interpolates linearly between the control points, and can be used to approximate complex easing functions, such as a bounce effect.

linear() easing Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-linear {
  --ease-out: ease-out;
  /* linear() joins its points with straight lines: enough points draw any curve. */
  --bounce: linear(0, 0.01 3.6%, 0.04 7.3%, 0.09 10.9%, 0.16 14.5%, 0.25 18.2%, 0.36 21.8%, 0.49 25.5%, 0.64 29.1%, 0.81 32.7%, 1 36.4%, 0.891 40.9%, 0.813 45.5%, 0.766 50%, 0.75 54.5%, 0.766 59.1%, 0.813 63.6%, 0.891 68.2%, 1 72.7%, 0.965 75.8%, 0.944 78.8%, 0.938 81.8%, 0.944 84.8%, 0.965 87.9%, 1 90.9%, 0.988 93.2%, 0.984 95.5%, 0.988 97.7%, 1);
  /* Values above 1 overshoot the end value. */
  --spring: linear(0, 0.237, 0.495, 0.732, 0.925, 1.061, 1.143, 1.178, 1.177, 1.153, 1.117, 1.077, 1.041, 1.012, 0.991, 0.978, 0.973, 0.973, 0.976, 0.982, 0.988, 0.994, 0.998, 1.001, 1.003, 1.004, 1.004, 1.004, 1.003, 1.002, 1.001, 1, 1, 0.999, 0.999, 0.999, 1);
  --fall: 150px;
  max-width: 52rem;
  margin: 0 auto;
}

.demo-linear .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fef3c7; color: #78350f; }
@supports not (transition-timing-function: linear(0, 1)) {
  .demo-linear .unsupported { display: block; }
  .demo-linear { --bounce: ease-out; --spring: ease-out; }
}

.demo-linear .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 14px; }
.demo-linear .bar span { color: #475569; font-size: 0.95rem; }
.demo-linear button { font: inherit; font-weight: 600; padding: 8px 18px; border: 0; border-radius: 999px; background: #4f46e5; color: #fff; cursor: pointer; }
.demo-linear button:hover { background: #4338ca; }
.demo-linear button:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 2px; }

.demo-linear .lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.demo-linear .lane { margin: 0; padding: 10px; border-radius: 14px; background: #f1f5f9; text-align: center; }
.demo-linear .lane figcaption { margin-top: 8px; font-size: 0.9rem; font-weight: 600; color: #334155; }
.demo-linear .lane code { font-size: 0.85em; }

.demo-linear .graph { display: block; width: 100%; max-width: 180px; margin: 0 auto; background: #fff; border-radius: 8px; }
.demo-linear .graph polyline { fill: none; stroke: #4f46e5; stroke-width: 2; stroke-linejoin: round; }
.demo-linear .graph .goal { stroke: #94a3b8; stroke-dasharray: 3 3; }

.demo-linear .stage { position: relative; height: 230px; margin-top: 10px; }
.demo-linear .floor { position: absolute; inset-inline: 0; top: 186px; border-top: 2px dashed #94a3b8; }
.demo-linear .ball {
  position: absolute;
  top: 0;
  left: 50%;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fda4af, #e11d48);
  translate: 0 0;
  transition: translate 1.4s var(--ease);
}
.demo-linear .bounce .ball { background: radial-gradient(circle at 35% 30%, #a5b4fc, #4338ca); }
.demo-linear .spring .ball { background: radial-gradient(circle at 35% 30%, #6ee7b7, #047857); }

.demo-linear .ease-out { --ease: var(--ease-out); }
.demo-linear .bounce { --ease: var(--bounce); }
.demo-linear .spring { --ease: var(--spring); }

.demo-linear.dropped .ball { translate: 0 var(--fall); }

@media (prefers-reduced-motion: reduce) {
  .demo-linear .ball { transition-duration: 0.01s; }
}

Browser support

First browser version supporting the whole linear() easing feature
Chrome 113
Edge 113
Firefox 112
Safari 17.2
Chrome Android 113
Safari iOS 17.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Nesting

Widely available since June 2026 CSS

web-features CSS nesting allows for shorter selectors, easier reading, and more modularity by nesting rules inside others.

Nesting Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-nesting .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not selector(&) {
  .demo-nesting .unsupported { display: block; }
}

/* One block, no repeated selectors: children, states, variants and media queries nest. */
.demo-nesting {
  max-width: 52rem;
  margin: 0 auto;

  h2 { margin: 0; font-size: 1.2rem; }
  .hint { margin: 2px 0 14px; color: #5b5b66; }

  .notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;

    @media (width < 640px) {
      grid-template-columns: 1fr;
      gap: 10px;
    }
  }

  .note {
    --tone: #2563eb;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid #e2e2ea;
    border-top: 5px solid var(--tone);
    border-radius: 12px;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;

    /* &.warn is the same element with a second class */
    &.warn { --tone: #b45309; }
    &.error { --tone: #b91c1c; }

    &:hover, &:has(:focus-visible) {
      transform: translateY(-3px);
      box-shadow: 0 10px 22px -12px var(--tone);
    }

    /* A parent reacting to a starred child, still nested */
    &:has(.star input:checked) { background: color-mix(in srgb, var(--tone) 10%, #fff); border-color: var(--tone); }

    h3 { margin: 0; font-size: 1rem; color: var(--tone); }
    p { margin: 0; }

    a {
      color: var(--tone);
      font-weight: 600;

      &:hover { text-decoration-thickness: 3px; }
      &:focus-visible { outline: 3px solid var(--tone); outline-offset: 2px; border-radius: 3px; }
    }

    .actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 4px;

      .btn {
        padding: 6px 14px;
        border: 2px solid var(--tone);
        border-radius: 999px;
        background: transparent;
        color: var(--tone);
        font: inherit;
        font-weight: 600;
        cursor: pointer;

        &:hover, &:focus-visible { background: var(--tone); color: #fff; outline-offset: 2px; }
        &:active { transform: scale(0.95); }
      }

      .star {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;

        input { accent-color: var(--tone); width: 1.1rem; height: 1.1rem; margin: 0; }
        span { transition: transform 0.2s; }
        input:checked + span { font-weight: 700; transform: scale(1.12); }
        &:has(:focus-visible) { outline: 3px solid var(--tone); outline-offset: 2px; border-radius: 4px; }
      }
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .note, .star span { transition: none; }
    .note:hover { transform: none; }
  }
}

Browser support

First browser version supporting the whole Nesting feature
Chrome 120
Edge 120
Firefox 117
Safari 17.2
Chrome Android 120
Safari iOS 17.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

:dir()

Widely available since June 2026 Selectors

web-features The :dir() CSS functional pseudo-class matches elements by text direction, either right to left (rtl) or left to right (ltr).

:dir() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-dir { max-width: 40rem; margin: 0 auto; }
.demo-dir .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not selector(:dir(rtl)) {
  .demo-dir .unsupported { display: block; }
}

.demo-dir .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 600; }
.demo-dir .bar span { margin-inline-end: 6px; }
.demo-dir .bar button {
  padding: 6px 16px;
  border: 2px solid #0f766e;
  border-radius: 999px;
  background: transparent;
  color: #0f766e;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.demo-dir .bar button[aria-pressed="true"] { background: #0f766e; color: #fff; }
.demo-dir button:focus-visible, .demo-dir a:focus-visible { outline: 3px solid #0f766e; outline-offset: 2px; }

.demo-dir .chat { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid #d4d4dc; border-radius: 16px; background: #f7f8fa; }
.demo-dir .msg { margin: 0; max-inline-size: 82%; width: fit-content; padding: 10px 14px; border-radius: 16px; line-height: 1.5; }

/* :dir() reads the real direction of each element, even when it is inherited or set with dir="auto". */
.demo-dir .msg:dir(ltr) { margin-right: auto; border-bottom-left-radius: 4px; background: #d9e8ff; color: #10264a; }
.demo-dir .msg:dir(rtl) { margin-left: auto; border-bottom-right-radius: 4px; background: #ffe6b8; color: #4a2f00; }

.demo-dir .send { margin: 0; }
.demo-dir .next { color: #0f766e; font-weight: 700; }
.demo-dir .next:dir(ltr)::after { content: " \2192"; }
.demo-dir .next:dir(rtl)::after { content: " \2190"; }

.demo-dir .compose { display: grid; gap: 4px; margin-top: 12px; }
.demo-dir .compose label { font-weight: 600; }
.demo-dir textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 9px 12px;
  border: 2px solid #b8b8c4;
  border-radius: 10px;
  font: inherit;
  resize: vertical;
}
.demo-dir textarea:focus-visible { outline: 3px solid #0f766e; outline-offset: 2px; }
.demo-dir textarea:dir(rtl) { border-color: #b45309; background: #fffaf0; }
.demo-dir textarea:dir(ltr) { border-color: #2563eb; background: #f5f9ff; }

Browser support

First browser version supporting the whole :dir() feature
Chrome 120
Edge 120
Firefox 49
Safari 16.4
Chrome Android 120
Safari iOS 16.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Exponential functions (CSS)

Widely available since June 2026 CSS

web-features The pow(), sqrt(), hypot(), log(), and exp() CSS functions compute various exponential functions.

Exponential functions (CSS) Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-exp, .demo-exp * { box-sizing: border-box; }
.demo-exp { --base: 1rem; --ratio: 1.25; max-width: 860px; margin: 0 auto; }
.demo-exp .hint { margin: 0 0 12px; }
.demo-exp .unsupported { display: none; margin: 0 0 12px; padding: 10px 12px; border: 2px dashed #b45309; border-radius: 8px; background: #fffbeb; }
@supports not (width: calc(pow(2, 3) * 1px)) {
  .demo-exp .unsupported { display: block; }
}

.demo-exp .controls { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-weight: 600; }
.demo-exp .controls input { flex: 1; max-width: 420px; accent-color: #1d4ed8; }
.demo-exp input:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }
.demo-exp output { min-width: 4ch; font-variant-numeric: tabular-nums; }

/* A modular type scale: base * ratio^step. */
.demo-exp .scale p { margin: 0; line-height: 1.15; font-weight: 700; font-size: calc(var(--base) * pow(var(--ratio), var(--n))); }

.demo-exp .picker { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 16px 0 10px; padding: 0; border: 0; }
.demo-exp .picker legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.demo-exp .picker label { display: inline-flex; align-items: center; gap: 6px; font-family: ui-monospace, monospace; }
.demo-exp .picker input { accent-color: #1d4ed8; }

.demo-exp .chart { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding: 8px; border-radius: 12px; background: #f1f5f9; }
.demo-exp .chart span { flex: 1; min-height: 2px; border-radius: 4px 4px 0 0; background: #1d4ed8; transition: height 0.4s ease; }

/* Each choice scales the function so that step 10 reaches the full height. */
.demo-exp:has([value="pow"]:checked) .chart span { height: calc(pow(var(--i), 2) / pow(10, 2) * 100%); }
.demo-exp:has([value="sqrt"]:checked) .chart span { height: calc(sqrt(var(--i)) / sqrt(10) * 100%); }
.demo-exp:has([value="log"]:checked) .chart span { height: calc(log(var(--i)) / log(10) * 100%); }
.demo-exp:has([value="exp"]:checked) .chart span { height: calc(exp(var(--i)) / exp(10) * 100%); }
.demo-exp:has([value="hypot"]:checked) .chart span { height: calc(hypot(var(--i), 5) / hypot(10, 5) * 100%); }

.demo-exp .formula { margin: 8px 0 0; font-family: ui-monospace, monospace; font-size: 0.9rem; }
.demo-exp:has([value="pow"]:checked) .formula::before { content: "pow(i, 2) / pow(10, 2)"; }
.demo-exp:has([value="sqrt"]:checked) .formula::before { content: "sqrt(i) / sqrt(10)"; }
.demo-exp:has([value="log"]:checked) .formula::before { content: "log(i) / log(10)"; }
.demo-exp:has([value="exp"]:checked) .formula::before { content: "exp(i) / exp(10)"; }
.demo-exp:has([value="hypot"]:checked) .formula::before { content: "hypot(i, 5) / hypot(10, 5)"; }

@media (prefers-reduced-motion: reduce) {
  .demo-exp .chart span { transition: none; }
}

Browser support

First browser version supporting the whole Exponential functions (CSS) feature
Chrome 120
Edge 120
Firefox 118
Safari 15.4
Chrome Android 120
Safari iOS 15.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Masks

Widely available since June 2026 Clipping, shapes, and masking

web-features The mask CSS property (and several longhand properties) partially or completely hides an element according to the shape and depth of an image.

Masks Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

Dashed chips belong to the same feature but this demo does not use them.

.demo-mask { max-width: 860px; margin-inline: auto; color: #1b1b1b; }
.demo-mask h2 { margin: 0 0 2px; font-size: 1.05rem; }
.demo-mask .hint { margin: 0 0 8px; padding: 0; color: #4b5563; font-size: 0.9rem; }

.demo-mask .unsupported {
  display: none;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fef3c7;
  color: #78350f;
}
@supports not (mask-image: linear-gradient(#000, transparent)) {
  .demo-mask .unsupported { display: block; }
}

.demo-mask .panels { display: flex; flex-wrap: wrap; gap: 28px; }
.demo-mask .panel { flex: 1 1 260px; min-width: 0; }

/* Opaque parts of the mask show the element, transparent parts hide it. */
.demo-mask .fade {
  height: 190px;
  overflow: auto;
  mask-image: linear-gradient(transparent, #000 36px, #000 calc(100% - 36px), transparent);
}
.demo-mask .fade:focus-visible { outline: 3px solid #4f46e5; outline-offset: 2px; }
.demo-mask .fade ul { list-style: none; margin: 0; padding: 36px 0; display: grid; gap: 8px; }
.demo-mask .fade li { padding: 10px 14px; border-radius: 10px; font-weight: 600; color: #fff; background: #4f46e5; }
.demo-mask .fade li:nth-child(3n + 2) { background: #db2777; }
.demo-mask .fade li:nth-child(3n) { background: #0f766e; }

.demo-mask fieldset { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 0 0 10px; padding: 0; border: 0; }
.demo-mask fieldset legend { width: 100%; }
.demo-mask fieldset input { margin: 0; accent-color: #4f46e5; }
.demo-mask fieldset label { margin-right: 4px; font-family: ui-monospace, monospace; font-size: 0.9rem; }

/* Two mask layers. The composite operator says how the top layer meets the one below. */
.demo-mask .venn {
  height: 190px;
  background: conic-gradient(from 20deg, #4f46e5, #db2777, #f59e0b, #0f766e, #4f46e5);
  mask-image:
    radial-gradient(circle 66px at 38% 50%, #000 98%, transparent 100%),
    radial-gradient(circle 66px at 62% 50%, #000 98%, transparent 100%);
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-composite: add;
}
.demo-mask:has(#op-sub:checked) .venn { mask-composite: subtract; }
.demo-mask:has(#op-int:checked) .venn { mask-composite: intersect; }
.demo-mask:has(#op-exc:checked) .venn { mask-composite: exclude; }

Browser support

First browser version supporting the whole Masks feature
Chrome 120
Edge 120
Firefox 53
Safari 15.4
Chrome Android 120
Safari iOS 15.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

scripting media query

Widely available since June 2026 Media queries

web-features The scripting CSS media query sets styles based on whether scripting such as JavaScript is available. Values are enabled if scripting is available, initial-only if scripting is only available on page load (for example, printed content), or none.

Live preview Example from MDN
abbr {
  color: #860304;
  font-weight: bold;
  transition: color 0.5s ease;
}

@media (hover: hover) {
  abbr:hover {
    color: #001ca8;
    transition-duration: 0.5s;
  }
}

@media not all and (hover: hover) {
  abbr::after {
    content: " (" attr(title) ")";
  }
}

In the reference

The example above is MDN's example for @media.

Browser support

First browser version supporting the whole scripting media query feature
Chrome 120
Edge 120
Firefox 113
Safari 17
Chrome Android 120
Safari iOS 17

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

lh unit

Widely available since May 2026 Units

web-features The lh CSS length unit corresponds to the requested line height, the computed value of the line-height property. Some lines may be higher than this based on their content.

lh unit Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-lh { --accent: #4f46e5; max-width: 46rem; margin-inline: auto; }
.demo-lh .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 12px; }
.demo-lh fieldset { display: flex; gap: 4px 14px; margin: 0; padding: 4px 12px 8px; border: 1px solid #cbd5e1; border-radius: 10px; }
.demo-lh legend { padding-inline: 4px; font: 0.85rem ui-monospace, monospace; color: #475569; }
.demo-lh label { cursor: pointer; }
.demo-lh input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* The stage sets the line height. Everything inside is measured in lh, so one value drives the whole page. */
.demo-lh .stage {
  --line: 1.6;
  box-sizing: border-box;
  padding: 1lh 1.25rem;
  font-size: 1rem;
  line-height: var(--line);
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  transition: line-height 0.35s ease;
}
.demo-lh:has(#lh-tight:checked) .stage { --line: 1.3; }
.demo-lh:has(#lh-loose:checked) .stage { --line: 2; }

/* A ruled grid, one line per 1lh. */
.demo-lh:has(#grid:checked) .stage {
  background-image: linear-gradient(to bottom, transparent calc(1lh - 1px), #f43f5e66 calc(1lh - 1px));
  background-size: 100% 1lh;
  background-origin: content-box;
  background-clip: content-box;
}

/* Margins and heights in lh stay on the grid. In a line-height declaration, lh refers to the parent. */
.demo-lh h2 { margin: 0; font-size: 1.35rem; line-height: 2lh; color: var(--accent); }
.demo-lh p { margin: 0 0 1lh; }
.demo-lh .art {
  height: 4lh;
  margin: 0 0 1lh;
  border-radius: 10px;
  background: repeating-linear-gradient(135deg, #6366f1 0 1lh, #a5b4fc 1lh 2lh);
}
.demo-lh blockquote { margin: 0 0 1lh; padding-inline: 1rem; border-inline-start: 4px solid var(--accent); font-style: italic; }
.demo-lh .stage > :last-child { margin-block-end: 0; }

@media (prefers-reduced-motion: reduce) { .demo-lh .stage { transition: none; } }

.demo-lh .unsupported { display: none; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #78350f; }
@supports not (height: 1lh) {
  .demo-lh .unsupported { display: block; }
}
/* A <length> unit: lh is the computed line-height of the element it is used on. */

Browser support

First browser version supporting the whole lh unit feature
Chrome 109
Edge 109
Firefox 120
Safari 16.4
Chrome Android 109
Safari iOS 16.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

rlh unit

Widely available since May 2026 Units

web-features The rlh CSS length unit is a font-relative length relative to the line height of root element.

Live preview Example from MDN
html {
  font-family: sans-serif;
  font-weight: bold;
  box-sizing: border-box;
}

.outer {
  width: 100%;
  height: 50px;
  background-color: #eeeeee;
  position: relative;
}

.inner {
  height: 50px;
  background-color: #999999;
  box-shadow:
    inset 3px 3px 5px rgb(255 255 255 / 50%),
    inset -3px -3px 5px rgb(0 0 0 / 50%);
}

.result {
  height: 20px;
  box-shadow:
    inset 3px 3px 5px rgb(255 255 255 / 50%),
    inset -3px -3px 5px rgb(0 0 0 / 50%);
  background-color: orange;
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.result code {
  position: absolute;
  margin-left: 20px;
}

.results {
  margin-top: 10px;
}

.input-container {
  position: absolute;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 50px;
}

label {
  margin: 0 10px 0 20px;
}

In the reference

The example above is MDN's example for <length>.

Browser support

First browser version supporting the whole rlh unit feature
Chrome 111
Edge 111
Firefox 120
Safari 16.4
Chrome Android 111
Safari iOS 16.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

:user-valid and :user-invalid

Widely available since May 2026 Selectors

web-features The :user-valid and :user-invalid pseudo-classes match form controls that have been marked as valid or invalid based on their validation constraints.

:user-valid and :user-invalid Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-user { max-width: 46rem; margin: 0 auto; }
.demo-user .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not selector(:user-invalid) {
  .demo-user .unsupported { display: block; }
}

.demo-user .form { padding: 18px; border: 1px solid #d4d4dc; border-radius: 16px; background: #fafafc; }
.demo-user .hint { margin: 0 0 14px; color: #5b5b66; }
.demo-user .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 16px; margin-bottom: 14px; }
.demo-user .field { display: grid; gap: 4px; align-content: start; }
.demo-user label { font-weight: 600; }
.demo-user code { padding: 1px 5px; border-radius: 5px; background: #ececf2; font-weight: 400; }

.demo-user input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 2px solid #b8b8c4;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.demo-user input:focus-visible { outline: 3px solid #4338ca; outline-offset: 2px; }

.demo-user .msg { display: none; margin: 0; font-size: 0.875rem; }
.demo-user .bad { color: #b91c1c; }
.demo-user .good { color: #15803d; }

/* Old way: :invalid matches an empty required field the moment the page loads. */
.demo-user .old input:invalid { border-color: #dc2626; background: #fef2f2; }
.demo-user .old input:invalid ~ .msg { display: block; color: #b91c1c; }

/* New way: these wait until the user has interacted with the field. */
.demo-user input:user-invalid { border-color: #dc2626; background: #fef2f2; }
.demo-user input:user-invalid ~ .bad { display: block; }
.demo-user input:user-valid { border-color: #16a34a; background: #f0fdf4; }
.demo-user input:user-valid ~ .good { display: block; }

.demo-user .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.demo-user button { padding: 9px 20px; border: 2px solid #4338ca; border-radius: 999px; background: #4338ca; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.demo-user button[type="reset"] { background: transparent; color: #4338ca; }
.demo-user button:focus-visible { outline: 3px solid #4338ca; outline-offset: 2px; }
.demo-user .status { margin: 0; color: #15803d; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .demo-user input { transition: none; }
}

Browser support

First browser version supporting the whole :user-valid and :user-invalid feature
Chrome 119
Edge 119
Firefox 88
Safari 16.5
Chrome Android 119
Safari iOS 16.5

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Clip path boxes

Widely available since May 2026 Clipping, shapes, and masking

web-features The fill-box, stroke-box, and view-box values for clip-path set an edge of the element's box to use as the clipping shape.

Clip path boxes Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-boxes { max-width: 860px; margin-inline: auto; color: #1b1b1b; }
.demo-boxes .hint { margin: 0 0 12px; color: #4b5563; }
.demo-boxes code { font-weight: 700; color: #4338ca; }

.demo-boxes .unsupported {
  display: none;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fef3c7;
  color: #78350f;
}
@supports not (clip-path: ellipse(50% 50%) fill-box) {
  .demo-boxes .unsupported { display: block; }
}

.demo-boxes .trio { display: flex; flex-wrap: wrap; gap: 16px; }
.demo-boxes figure { margin: 0; width: 250px; max-width: 100%; }
.demo-boxes svg { display: block; width: 100%; background: #f3f4f6; border-radius: 8px; }
.demo-boxes figcaption { margin-top: 4px; font-size: 0.85rem; }

.demo-boxes rect { stroke-width: 20; }
.demo-boxes .box { fill: none; stroke: #6b7280; stroke-width: 1; stroke-dasharray: 5 3; }
.demo-boxes .ghost { fill: #818cf8; stroke: #db2777; opacity: 0.2; }
.demo-boxes .shape { fill: #4f46e5; stroke: #db2777; }

/* One shape, three reference boxes. The dashed outline is the box used. */
.demo-boxes .fb { clip-path: ellipse(50% 50%) fill-box; }
.demo-boxes .sb { clip-path: ellipse(50% 50%) stroke-box; }
.demo-boxes .vb { clip-path: ellipse(50% 50%) view-box; }

.demo-boxes .pick {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  margin: 18px 0 0;
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}
.demo-boxes .pick legend { padding: 0 6px; font-size: 0.85rem; color: #4b5563; }
.demo-boxes .pick input { accent-color: #4f46e5; margin: 0; }
.demo-boxes .pick label { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; font-family: ui-monospace, monospace; font-size: 0.9rem; }

.demo-boxes .stage { padding: 6px 0 0; }
.demo-boxes .card {
  max-width: 320px;
  margin: 18px;
  padding: 14px;
  border: 12px dashed #db2777;
  border-radius: 28px;
  background: #e0e7ff;
  box-shadow: 0 0 0 10px #a5b4fc;
  outline: 4px solid #f59e0b;
  outline-offset: 8px;
}

/* A geometry box alone is the clip, rounded corners included. */
.demo-boxes:has(#b-margin:checked) .card { clip-path: margin-box; }
.demo-boxes:has(#b-border:checked) .card { clip-path: border-box; }
.demo-boxes:has(#b-padding:checked) .card { clip-path: padding-box; }
.demo-boxes:has(#b-content:checked) .card { clip-path: content-box; }

Browser support

First browser version supporting the whole Clip path boxes feature
Chrome 119
Edge 119
Firefox 54
Safari 13.1
Chrome Android 119
Safari iOS 13.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

@counter-style

Widely available since March 2026 Counters

web-features The @counter-style CSS at-rule sets custom counter styles for list items. For example, you can use a sequence of specific symbols instead of numbers for an ordered list.

@counter-style Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

Dashed chips belong to the same feature but this demo does not use them.

/* system: cyclic repeats the symbols forever. */
@counter-style diamonds {
  system: cyclic;
  symbols: "\25C6" "\25C7";
  suffix: "  ";
}

/* system: additive builds a number from weighted symbols, like roman numerals. */
@counter-style roman {
  system: additive;
  additive-symbols: 1000 M, 900 CM, 500 D, 400 CD, 100 C, 90 XC, 50 L, 40 XL, 10 X, 9 IX, 5 V, 4 IV, 1 I;
  range: 1 3999;
  suffix: ". ";
}

/* system: numeric is a positional system, here with a minimum width of 3. */
@counter-style padded {
  system: numeric;
  symbols: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9";
  pad: 3 "0";
  suffix: "  ";
}

/* system: alphabetic counts a, b, ... z, aa, ab, with any alphabet. */
@counter-style greek {
  system: alphabetic;
  symbols: "\3B1" "\3B2" "\3B3" "\3B4" "\3B5" "\3B6" "\3B7" "\3B8" "\3B9" "\3BA" "\3BB" "\3BC" "\3BD" "\3BE" "\3BF" "\3C0" "\3C1" "\3C3" "\3C4" "\3C5" "\3C6" "\3C7" "\3C8" "\3C9";
  suffix: ") ";
}

.demo-counter { --accent: #4f46e5; max-width: 54rem; margin-inline: auto; }
.demo-counter .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; }
.demo-counter input { width: 6rem; padding: 4px 8px; font: inherit; border: 1px solid #94a3b8; border-radius: 8px; }
.demo-counter input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.demo-counter .hint { color: #555; font-size: 0.9rem; }

.demo-counter .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 12px; }
.demo-counter .card { padding: 10px 14px 14px; border-radius: 14px; background: #f8f8fc; border: 1px solid #e2e8f0; }
.demo-counter .card h2 { margin: 0 0 8px; color: var(--accent); font: 0.8rem ui-monospace, monospace; }
.demo-counter ol { margin: 0; padding-left: 0; font-size: 1.05rem; line-height: 1.5; }
.demo-counter li { padding-left: 0.25rem; }
.demo-counter li::marker { color: var(--accent); font-weight: 700; }

.demo-counter .cyclic ol { list-style: diamonds inside; }
.demo-counter .roman ol { list-style: roman inside; }
.demo-counter .padded ol { list-style: padded inside; }
.demo-counter .greek ol { list-style: greek inside; }

.demo-counter .unsupported { display: none; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #78350f; }
@supports not (list-style: roman) {
  .demo-counter .unsupported { display: block; }
}

Browser support

First browser version supporting the whole @counter-style feature
Chrome 91
Edge 91
Firefox 33
Safari 17
Chrome Android 91
Safari iOS 17

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

contain-intrinsic-size

Widely available since March 2026 Containment

web-features The contain-intrinsic-size CSS property sets the intrinsic size of an element. When using size containment, the browser will lay out the element as if it had a single child of this size.

Live preview Example from MDN
#contained_element {
  border: 2px solid green;
  inline-size: 151px;
  content-visibility: auto;
  contain-intrinsic-inline-size: 152px;
  contain-intrinsic-block-size: 52px;
}
.child_element {
  border: 1px solid red;
  background: blue;
  block-size: 50px;
  inline-size: 150px;
}

In the reference

The example above is MDN's example for contain-intrinsic-block-size.

Browser support

First browser version supporting the whole contain-intrinsic-size feature
Chrome 83
Edge 83
Firefox 107
Safari 17
Chrome Android 83
Safari iOS 17

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Hyphenate character

Widely available since March 2026 Text wrap

web-features The hyphenate-character CSS property sets the character or string to use at the end of a line before a line break.

Live preview Example from MDN
#example-element {
  border: 2px dashed #999999;
  font-size: 1.5rem;
  text-align: left;
  width: 7rem;
  hyphens: auto;
}

In the reference

The example above is MDN's example for hyphenate-character.

Browser support

First browser version supporting the whole Hyphenate character feature
Chrome 106
Edge 106
Firefox 98
Safari 17
Chrome Android 106
Safari iOS 17

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Hyphenation

Widely available since March 2026 CSS

web-features The hyphens CSS property controls when long words are broken by line wrapping. Although called hyphens, the property applies to word-splitting behavior across languages, such as customary spelling changes or the use of other characters. Support for non-English languages varies significantly.

Hyphenation Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-hyphens { --accent: #4f46e5; max-width: 46rem; margin-inline: auto; }
.demo-hyphens .hint { margin: 0 0 10px; color: #555; font-size: 0.9rem; }

/* The box is resizable: the text re-wraps, and hyphenation follows the lang attribute on it. */
.demo-hyphens .stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  box-sizing: border-box;
  width: 22rem;
  min-width: 13rem;
  max-width: 100%;
  padding: 12px;
  overflow: hidden;
  resize: horizontal;
  border: 2px dashed #9ca3af;
  border-radius: 14px;
  background: #f8f8fc;
}
.demo-hyphens .sample { padding: 8px 12px 10px; overflow: hidden; background: #fff; border-radius: 10px; border-left: 5px solid var(--accent); }
.demo-hyphens .sample h2 { margin: 0 0 4px; color: var(--accent); font: 0.8rem ui-monospace, monospace; }
.demo-hyphens .text { margin: 0; text-align: justify; font-size: 1.05rem; line-height: 1.45; }

.demo-hyphens .none { hyphens: none; }
.demo-hyphens .manual { hyphens: manual; }
.demo-hyphens .auto { hyphens: auto; }

.demo-hyphens .unsupported { display: none; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #78350f; }
@supports not (hyphens: auto) {
  .demo-hyphens .unsupported { display: block; }
}

Browser support

First browser version supporting the whole Hyphenation feature
Chrome 88
Edge 88
Firefox 43
Safari 17
Chrome Android 55
Safari iOS 17

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

image-set()

Widely available since March 2026 CSS

web-features The image-set() CSS function provides a set of images at different resolutions or pixel densities, which the browser can pick from, depending on the device capabilities.

image-set() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

Dashed chips belong to the same feature but this demo does not use them.

.demo-set {
  /* Two inline SVG files. The 2x one is drawn on a 480 by 280 canvas, twice the size of the 1x one. */
  --img-1x: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='140' viewBox='0 0 240 140'><rect width='240' height='140' fill='%23c7d2fe'/><circle cx='120' cy='70' r='52' fill='%236366f1'/><text x='120' y='88' font-family='sans-serif' font-size='52' font-weight='700' text-anchor='middle' fill='white'>1x</text></svg>");
  --img-2x: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='480' height='280' viewBox='0 0 480 280'><defs><pattern id='p' width='12' height='12' patternUnits='userSpaceOnUse'><circle cx='6' cy='6' r='1.6' fill='%23be185d'/></pattern></defs><rect width='480' height='280' fill='%23fde68a'/><rect width='480' height='280' fill='url(%23p)'/><circle cx='240' cy='140' r='104' fill='%23db2777'/><circle cx='240' cy='140' r='88' fill='none' stroke='white' stroke-width='2' stroke-dasharray='4 6'/><text x='240' y='176' font-family='sans-serif' font-size='104' font-weight='700' text-anchor='middle' fill='white'>2x</text></svg>");
  max-width: 860px;
  margin-inline: auto;
  color: #1b1b1b;
}

.demo-set .unsupported {
  display: none;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fef3c7;
  color: #78350f;
}
@supports not (background-image: image-set(linear-gradient(red, blue) 1x)) {
  .demo-set .unsupported { display: block; }
}

.demo-set .status { margin: 0 0 14px; }
.demo-set output { font-weight: 700; color: #4338ca; }
.demo-set .row { display: flex; flex-wrap: wrap; gap: 16px; }
.demo-set figure { margin: 0; width: 240px; max-width: 100%; }
.demo-set figcaption { margin-top: 6px; font-size: 0.85rem; line-height: 1.35; }
.demo-set code { font-weight: 700; color: #4338ca; }

.demo-set .art {
  aspect-ratio: 240 / 140;
  border-radius: 12px;
  overflow: hidden;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/* One image per pixel density. The browser takes the closest match. */
.demo-set .picked { background-image: image-set(var(--img-1x) 1x, var(--img-2x) 2x); }
.demo-set .only-1x { background-image: var(--img-1x); }
.demo-set .only-2x { background-image: var(--img-2x); }

Browser support

First browser version supporting the whole image-set() feature
Chrome 113
Edge 113
Firefox 89
Safari 17
Chrome Android 113
Safari iOS 17

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Overflow media queries

Widely available since March 2026 Media queries

web-features The overflow-block and overflow-inline CSS media queries set styles based on the way a device displays content that's larger than the viewport or page area. For example, a laptop lets users scroll to reveal content, while a printer displays overflowing content on additional pages.

No demo written yet and no MDN example for this feature: read its definition through the links below.

In the reference

Browser support

First browser version supporting the whole Overflow media queries feature
Chrome 113
Edge 113
Firefox 66
Safari 17
Chrome Android 113
Safari iOS 17

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Update frequency media query

Widely available since March 2026 Media queries

web-features The update CSS media query sets styles based on whether and how fast the user's device can modify display after it has been rendered. For example, you can avoid animations on devices that aren't fast enough to display them smoothly.

Live preview Example from MDN
abbr {
  color: #860304;
  font-weight: bold;
  transition: color 0.5s ease;
}

@media (hover: hover) {
  abbr:hover {
    color: #001ca8;
    transition-duration: 0.5s;
  }
}

@media not all and (hover: hover) {
  abbr::after {
    content: " (" attr(title) ")";
  }
}

In the reference

The example above is MDN's example for @media.

Browser support

First browser version supporting the whole Update frequency media query feature
Chrome 113
Edge 113
Firefox 102
Safari 17
Chrome Android 113
Safari iOS 17

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Subgrid

Widely available since March 2026 Grid

web-features The subgrid value for the grid-template-columns and grid-template-rows properties allows a grid item to inherit the grid definition of its parent grid container.

Subgrid Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-subgrid { display: grid; gap: 14px; }
.demo-subgrid .switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.demo-subgrid .switch input { width: 1.1rem; height: 1.1rem; accent-color: #0b7a75; }
.demo-subgrid .switch input:focus-visible { outline: 3px solid #e0489b; outline-offset: 2px; }

.demo-subgrid .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 16px;
}

/* Every card spans three rows of the parent grid. */
.demo-subgrid .card {
  grid-row: span 3;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0;
  padding: 16px;
  border: 1px solid #b9dcd9;
  border-radius: 12px;
  background: #f1fbfa;
}
.demo-subgrid .card > * { margin: 0; padding: 10px 0; }
.demo-subgrid .card h2 { padding: 10px 12px; border-radius: 8px; background: #0b7a75; color: #fff; font-size: 1.1rem; }
.demo-subgrid .card p { border-bottom: 1px dashed #8bc4bf; }
.demo-subgrid .card .price { font-size: 1.5rem; font-weight: 700; color: #0b5e5a; border-bottom: 0; }

/* The card borrows its three rows from the parent, so cards in the same row line up. */
.demo-subgrid:has(#use-subgrid:checked) .card { grid-template-rows: subgrid; }

.demo-subgrid .unsupported { display: none; margin: 0; padding: 8px 12px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not (grid-template-rows: subgrid) {
  .demo-subgrid .unsupported { display: block; }
}

Browser support

First browser version supporting the whole Subgrid feature
Chrome 117
Edge 117
Firefox 71
Safari 16
Chrome Android 117
Safari iOS 16

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Two-value display property

Widely available since January 2026 CSS

web-features The display CSS property accepts multiple keyword values, such as inline flex or block flow, to explicitly set an element's inner and outer layout mode. Also known as 2-value, multi-keyword, or multiple value syntax.

Two-value display property Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-display { display: grid; gap: 12px; }

.demo-display .controls { display: flex; flex-wrap: wrap; gap: 10px; }
.demo-display fieldset { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 8px 12px; border: 1px solid #c9c9d3; border-radius: 8px; }
.demo-display legend { padding: 0 6px; font-size: 0.85rem; color: #444; }
.demo-display label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.demo-display input { accent-color: #7c3aed; }
.demo-display input:focus-visible { outline: 3px solid #e0489b; outline-offset: 2px; }

/* Two radios, two custom properties, one display declaration. */
.demo-display { --outer: block; --inner: flex; }
.demo-display:has(#o-inline:checked) { --outer: inline; }
.demo-display:has(#i-flow:checked) { --inner: flow; }
.demo-display:has(#i-flow-root:checked) { --inner: flow-root; }
.demo-display:has(#i-grid:checked) { --inner: grid; }

.demo-display .code {
  margin: 0;
  padding: 6px 12px;
  border-radius: 8px;
  background: #1e1b3a;
  color: #e9e5ff;
  font-family: ui-monospace, monospace;
}
.demo-display:has(#o-block:checked):has(#i-flow:checked) .code::before { content: "display: block flow;"; }
.demo-display:has(#o-block:checked):has(#i-flow-root:checked) .code::before { content: "display: block flow-root;"; }
.demo-display:has(#o-block:checked):has(#i-flex:checked) .code::before { content: "display: block flex;"; }
.demo-display:has(#o-block:checked):has(#i-grid:checked) .code::before { content: "display: block grid;"; }
.demo-display:has(#o-inline:checked):has(#i-flow:checked) .code::before { content: "display: inline flow;"; }
.demo-display:has(#o-inline:checked):has(#i-flow-root:checked) .code::before { content: "display: inline flow-root;"; }
.demo-display:has(#o-inline:checked):has(#i-flex:checked) .code::before { content: "display: inline flex;"; }
.demo-display:has(#o-inline:checked):has(#i-grid:checked) .code::before { content: "display: inline grid;"; }

.demo-display .sample { margin: 0; padding: 14px; border-radius: 10px; background: #f5f3ff; line-height: 1.9; }
.demo-display .box {
  display: var(--outer) var(--inner);
  gap: 6px;
  grid-template-columns: repeat(2, auto);
  padding: 6px;
  border: 2px dashed #7c3aed;
  border-radius: 8px;
  background: #fff;
  line-height: 1.4;
}
.demo-display .box i { padding: 2px 10px; border-radius: 6px; background: #7c3aed; color: #fff; font-style: normal; }

.demo-display .unsupported { display: none; margin: 0; padding: 8px 12px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not (display: inline flex) {
  .demo-display .unsupported { display: block; }
}

Browser support

First browser version supporting the whole Two-value display property feature
Chrome 115
Edge 115
Firefox 70
Safari 15
Chrome Android 115
Safari iOS 15

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

animation-composition

Widely available since January 2026 Animation

web-features The animation-composition CSS property chooses how to combine animations that affect the same property.

animation-composition Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-ac, .demo-ac * { box-sizing: border-box; }
.demo-ac { max-width: 860px; margin: 0 auto; }
.demo-ac .hint { margin: 0 0 12px; }
.demo-ac .unsupported { display: none; margin: 0 0 12px; padding: 10px 12px; border: 2px dashed #b45309; border-radius: 8px; background: #fffbeb; }
@supports not (animation-composition: add) {
  .demo-ac .unsupported { display: block; }
}

.demo-ac .lanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.demo-ac .lane { margin: 0; }
.demo-ac .track { position: relative; height: 150px; border-radius: 12px; background: #f1f5f9; overflow: hidden; }
.demo-ac figcaption { margin-top: 8px; font-size: 0.9rem; }

.demo-ac .bar, .demo-ac .ghost {
  position: absolute;
  left: 16px;
  top: 20px;
  width: 64px;
  height: 20px;
  border-radius: 10px;
  /* The underlying value: shared by the three bars. */
  transform: translateX(20px) rotate(45deg);
}
.demo-ac .ghost { border: 2px dashed #64748b; }
.demo-ac .bar { background: #1d4ed8; animation: slide 2.4s ease-in-out infinite alternate; }
.demo-ac .bar::after { content: ""; position: absolute; right: 5px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; }

/* The keyframe only moves the bar along x. How it meets the underlying transform is up to animation-composition. */
@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(110px); }
}

.demo-ac .replace .bar { animation-composition: replace; }
.demo-ac .add .bar { animation-composition: add; }
.demo-ac .accumulate .bar { animation-composition: accumulate; }

@media (prefers-reduced-motion: reduce) {
  .demo-ac .bar { animation-play-state: paused; }
}

Browser support

First browser version supporting the whole animation-composition feature
Chrome 112
Edge 112
Firefox 115
Safari 16
Chrome Android 112
Safari iOS 16

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

calc() keywords

Widely available since December 2025 CSS

web-features The e, pi, infinity, and NaN keywords represent well-defined constants accepted in CSS math functions such as calc().

Live preview Example from MDN
#wrapper {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: start;
  width: 200px;
}
.container > div {
  width: 100px;
  height: 100px;
  margin: 10px;
}

span {
  font-family: monospace;
  font-size: 0.8em;
}

#e {
  background-color: blue;
}

#pi {
  background-color: blue;
}

In the reference

The example above is MDN's example for <calc-keyword>.

Browser support

First browser version supporting the whole calc() keywords feature
Chrome 110
Edge 110
Firefox 114
Safari 16
Chrome Android 110
Safari iOS 16

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

:nth-child() of <selector>

Widely available since November 2025 Selectors

web-features The of syntax for the :nth-child() and :nth-last-child() CSS functional pseudo-classes match elements by the relative position of elements, counted from the first or last sibling matching a selector list.

:nth-child() of <selector> Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-nth { max-width: 46rem; margin: 0 auto; --stripe: #e6defc; --ink: #1b1b1b; }
.demo-nth .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not selector(:nth-child(1 of li)) {
  .demo-nth .unsupported { display: block; }
}

.demo-nth .filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 0 0 14px; padding: 8px 14px; border: 1px solid #d4d4dc; border-radius: 10px; }
.demo-nth legend { padding: 0 6px; font-weight: 600; }
.demo-nth .filter label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.demo-nth input { accent-color: #6d28d9; width: 1.1rem; height: 1.1rem; margin: 0; }
.demo-nth .filter label:has(:focus-visible) { outline: 3px solid #6d28d9; outline-offset: 2px; border-radius: 4px; }

.demo-nth .lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.demo-nth h2 { margin: 0 0 8px; font-size: 0.95rem; }
.demo-nth code { padding: 2px 6px; border-radius: 6px; background: #f0f0f5; }
.demo-nth ul { margin: 0; padding: 0; list-style: none; border: 1px solid #d4d4dc; border-radius: 12px; overflow: clip; }
.demo-nth li { display: flex; justify-content: space-between; gap: 8px; padding: 9px 14px; color: var(--ink); }
.demo-nth li::after { content: attr(data-s); color: #5b5b66; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* The filter hides rows with display: none. Hidden rows still count for :nth-child(even)... */
.demo-nth:has(#f-open:checked) li[data-s="done"],
.demo-nth:has(#f-done:checked) li[data-s="open"] { display: none; }

.demo-nth .plain li:nth-child(even) { background: var(--stripe); }

/* ...but "of S" counts only the rows that match S, so the stripes stay perfect. */
.demo-nth:has(#f-all:checked) .better li:nth-child(even of li) { background: var(--stripe); }
.demo-nth:has(#f-open:checked) .better li:nth-child(even of [data-s="open"]) { background: var(--stripe); }
.demo-nth:has(#f-done:checked) .better li:nth-child(even of [data-s="done"]) { background: var(--stripe); }

/* Counting from the end works the same way: the last visible row gets a bar. */
.demo-nth:has(#f-all:checked) .better li:nth-last-child(1 of li) { box-shadow: inset 5px 0 0 #6d28d9; }
.demo-nth:has(#f-open:checked) .better li:nth-last-child(1 of [data-s="open"]) { box-shadow: inset 5px 0 0 #6d28d9; }
.demo-nth:has(#f-done:checked) .better li:nth-last-child(1 of [data-s="done"]) { box-shadow: inset 5px 0 0 #6d28d9; }

@media (width < 560px) {
  .demo-nth .lists { grid-template-columns: minmax(0, 1fr); }
}

Browser support

First browser version supporting the whole :nth-child() of <selector> feature
Chrome 111
Edge 111
Firefox 113
Safari 9
Chrome Android 111
Safari iOS 9

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

color-mix()

Widely available since November 2025 CSS

web-features The color-mix() function mixes two colors in a given color space and by a given amount. Commonly, lighter or darker variations of a color are created by mixing with white or black.

color-mix() Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-mix { --a: #0057ff; --b: #ffd400; max-width: 860px; margin: 0 auto; }
.demo-mix .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not (color: color-mix(in srgb, red, blue)) {
  .demo-mix .unsupported { display: block; }
}

.demo-mix .controls { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 8px; }
.demo-mix .controls label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.demo-mix input[type="color"] { width: 48px; height: 32px; padding: 0; border: 1px solid #888; border-radius: 6px; }
.demo-mix :focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

.demo-mix .label { margin: 14px 0 6px; font-size: 13px; font-weight: 600; }
.demo-mix .row { display: flex; gap: 0; margin: 0 0 6px; padding: 0; list-style: none; border-radius: 8px; overflow: hidden; }
.demo-mix .row li {
  flex: 1; min-width: 0; height: 52px; padding: 6px; box-sizing: border-box;
  display: flex; align-items: flex-end; font-size: 11px; font-weight: 600;
  color: white; text-shadow: 0 1px 2px rgb(0 0 0 / 0.6);
  /* --p is the share of A. The rest of the 100% goes to B. */
  background: color-mix(in srgb, var(--a) var(--p), var(--b));
}
.demo-mix .oklab li { background: color-mix(in oklab, var(--a) var(--p), var(--b)); }
.demo-mix .oklch li { background: color-mix(in oklch, var(--a) var(--p), var(--b)); }

/* Mixing with white or black gives tints and shades. */
.demo-mix .tints li {
  background: color-mix(in oklab, color-mix(in oklab, var(--a), white var(--w)), black var(--k));
}

Browser support

First browser version supporting the whole color-mix() feature
Chrome 111
Edge 111
Firefox 113
Safari 16.2
Chrome Android 111
Safari iOS 16.2

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

color()

Widely available since November 2025 Color types

web-features The color() function picks a color from a given color space. Wide gamut color spaces like display-p3 allow showing more vibrant and saturated colors than the standard srgb color space.

Live preview Example from MDN
div {
  width: 50px;
  height: 50px;
  padding: 5px;
  margin: 5px;
  display: inline-block;
  border: 1px solid black;
}

[data-color="red-a98-rgb"] {
  background-color: color(a98-rgb 1 0 0);
}
[data-color="red-prophoto-rgb"] {
  background-color: color(prophoto-rgb 1 0 0);
}
/* sRGB gamut, linear-light — full brightness (green channel 100%) */
[data-color="green-srgb-linear"] {
  background-color: color(srgb-linear 0 1 0);
}
/* P3 gamut (wider), gamma-encoded — low brightness (green channel ~21% light output) */
[data-color="green-display-p3"] {
  background-color: color(display-p3 0 0.5 0);
}
/* P3 gamut (wider), linear-light — half brightness (green channel at 50% light output) */
[data-color="green-display-p3-linear"] {
  background-color: color(display-p3-linear 0 0.5 0);
}
[data-color="blue-rec2020"] {
  background-color: color(rec2020 0 0 1);
}
[data-color="blue-srgb"] {
  background-color: color(srgb 0 0 1);
}

In the reference

The example above is MDN's example for color().

Browser support

First browser version supporting the whole color() feature
Chrome 111
Edge 111
Firefox 113
Safari 15
Chrome Android 111
Safari iOS 15

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Lab and LCH

Widely available since November 2025 Color types

web-features The CIE Lab color space expresses colors in terms of lightness and how red/green and blue/yellow a color is. LCH is a variant of Lab with polar coordinates. These color spaces can be used with the CSS color(), lab(), and lch() functions. Also known as CIELAB and CIELCH.

Live preview Example from MDN
body {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
div {
  height: 50px;
  flex: 0 0 28%;
  border: 1px solid black;
}

[data-color="red-dark"] {
  background-color: lab(5 125 71);
}
[data-color="red"] {
  background-color: lab(40 125 71);
}
[data-color="red-light"] {
  background-color: lab(95 125 71);
}

[data-color="green-dark"] {
  background-color: lab(10% -120 125);
}
[data-color="green"] {
  background-color: lab(50% -120 125);
}
[data-color="green-light"] {
  background-color: lab(90% -120 125);
}

[data-color="blue-dark"] {
  background-color: lab(10 -120 -120);
}
[data-color="blue"] {
  background-color: lab(50 -120 -120);
}
[data-color="blue-light"] {
  background-color: lab(90 -120 -120);
}

In the reference

The example above is MDN's example for lab().

Browser support

First browser version supporting the whole Lab and LCH feature
Chrome 111
Edge 111
Firefox 113
Safari 15
Chrome Android 111
Safari iOS 15

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Oklab and OkLCh

Widely available since November 2025 Color types

web-features The Oklab color space expresses colors in terms of lightness and how red/green and blue/yellow a color is, aiming to match how humans perceive colors. OkLCh is a variant of Oklab with polar coordinates. These color spaces can be used with the CSS oklab() and oklch() functions.

Oklab and OkLCh Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-ok { --lightness: 0.72; max-width: 860px; margin: 0 auto; }
.demo-ok .unsupported { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not (color: oklch(0.7 0.1 200)) {
  .demo-ok .unsupported { display: block; }
}

.demo-ok .controls { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 8px; }
.demo-ok .controls label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.demo-ok :focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

.demo-ok .label { margin: 14px 0 6px; font-size: 13px; font-weight: 600; }
.demo-ok .row { display: flex; margin: 0; padding: 0; list-style: none; border-radius: 8px; overflow: hidden; }
.demo-ok .row li { flex: 1; min-width: 0; height: 56px; }

.demo-ok .hsl li { background: hsl(var(--h) 100% 50%); }
/* In OkLCh, L is perceived lightness: equal L reads as equal brightness for every hue. */
.demo-ok .lch li { background: oklch(var(--lightness) 0.15 var(--h)); }
.demo-ok .lab li { background: oklab(var(--lightness) 0 var(--b)); }

/* Grayscale makes the difference obvious: even steps for OkLCh, uneven for HSL. */
.demo-ok:has(#gray:checked) .row { filter: grayscale(1); }
.demo-ok .row { transition: filter 0.4s; }
@media (prefers-reduced-motion: reduce) {
  .demo-ok .row { transition: none; }
}

Browser support

First browser version supporting the whole Oklab and OkLCh feature
Chrome 111
Edge 111
Firefox 113
Safari 15.4
Chrome Android 111
Safari iOS 15.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

font-synthesis-small-caps

Widely available since September 2025 Font synthesis

web-features The font-synthesis-small-caps CSS property sets whether or not the browser should synthesize small caps typefaces when they're missing from the font.

Live preview Example from MDN
@import "https://fonts.googleapis.com/css2?family=Montserrat&display=swap";

.english {
  font-family: "Montserrat", sans-serif;
}
.small-caps {
  font-variant: small-caps;
}
.no-syn {
  font-synthesis-small-caps: none;
}

In the reference

The example above is MDN's example for font-synthesis-small-caps.

Browser support

First browser version supporting the whole font-synthesis-small-caps feature
Chrome 97
Edge 97
Firefox 111
Safari 16.4
Chrome Android 97
Safari iOS 16.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

font-synthesis-style

Widely available since September 2025 Font synthesis

web-features The font-synthesis-style CSS property sets whether or not the browser should synthesize italic and oblique typefaces when they're missing from the font.

Live preview Example from MDN
@import "https://fonts.googleapis.com/css2?family=Montserrat&display=swap";

.english {
  font-family: "Montserrat", sans-serif;
}

.no-syn {
  font-synthesis-style: none;
}

In the reference

The example above is MDN's example for font-synthesis-style.

Browser support

First browser version supporting the whole font-synthesis-style feature
Chrome 97
Edge 97
Firefox 111
Safari 16.4
Chrome Android 97
Safari iOS 16.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

font-synthesis-weight

Widely available since September 2025 Font synthesis

web-features The font-synthesis-weight CSS property sets whether or not the browser should synthesize bold typefaces when they're missing from the font.

Live preview Example from MDN
@import "https://fonts.googleapis.com/css2?family=Montserrat&display=swap";

.english {
  font-family: "Montserrat", sans-serif;
}
.no-syn {
  font-synthesis-weight: none;
}

In the reference

The example above is MDN's example for font-synthesis-weight.

Browser support

First browser version supporting the whole font-synthesis-weight feature
Chrome 97
Edge 97
Firefox 111
Safari 16.4
Chrome Android 97
Safari iOS 16.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Media query range syntax

Widely available since September 2025 Media queries

web-features The range syntax of CSS media queries allows you to use mathematical comparison operators such as <, >, <=, and >= to define a range of values for a media query. For example, (400px < width < 1000px) returns true if the viewport width is between 400px and 1000px.

Media query range syntax Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

.demo-mq { display: grid; gap: 12px; }
.demo-mq .hint { margin: 0; color: #555; font-size: 0.9rem; }

.demo-mq .panel { padding: 16px; border-radius: 12px; background: #e5e7eb; color: #111827; text-align: center; }
.demo-mq .now { margin: 0; font-size: 1.1rem; }
.demo-mq output { font-weight: 700; font-family: ui-monospace, monospace; }
.demo-mq .band { margin: 6px 0 0; font-size: 1.6rem; font-weight: 800; }
.demo-mq .band::before { content: "No range matched"; }

.demo-mq .rows { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.demo-mq .rows li { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 8px 12px; border: 2px solid #d1d5db; border-radius: 10px; background: #fff; }
.demo-mq .lamp { grid-row: span 2; width: 18px; height: 18px; border-radius: 50%; background: #d1d5db; }
.demo-mq code { font-size: 0.9rem; overflow-wrap: anywhere; }
.demo-mq .old { color: #6b7280; }
.demo-mq .old::before { content: "old: "; }

/* The four bands use the range syntax: a comparison, or a value between two bounds. */
@media (width < 480px) {
  .demo-mq .panel { background: #fecaca; }
  .demo-mq .band::before { content: "Small"; }
  .demo-mq .r1 { border-color: #dc2626; background: #fef2f2; }
  .demo-mq .r1 .lamp { background: #dc2626; box-shadow: 0 0 10px #dc2626; }
}
@media (480px <= width < 720px) {
  .demo-mq .panel { background: #fde68a; }
  .demo-mq .band::before { content: "Medium"; }
  .demo-mq .r2 { border-color: #d97706; background: #fffbeb; }
  .demo-mq .r2 .lamp { background: #d97706; box-shadow: 0 0 10px #d97706; }
}
@media (720px <= width < 960px) {
  .demo-mq .panel { background: #bbf7d0; }
  .demo-mq .band::before { content: "Large"; }
  .demo-mq .r3 { border-color: #16a34a; background: #f0fdf4; }
  .demo-mq .r3 .lamp { background: #16a34a; box-shadow: 0 0 10px #16a34a; }
}
@media (width >= 960px) {
  .demo-mq .panel { background: #bfdbfe; }
  .demo-mq .band::before { content: "Extra large"; }
  .demo-mq .r4 { border-color: #2563eb; background: #eff6ff; }
  .demo-mq .r4 .lamp { background: #2563eb; box-shadow: 0 0 10px #2563eb; }
}

/* A browser without range syntax drops the query above, so the notice stays visible. */
.demo-mq .unsupported { display: block; margin: 0; padding: 8px 12px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@media (width >= 0px) {
  .demo-mq .unsupported { display: none; }
}

Browser support

First browser version supporting the whole Media query range syntax feature
Chrome 104
Edge 104
Firefox 102
Safari 16.4
Chrome Android 104
Safari iOS 16.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

outline

Widely available since September 2025

web-features The outline CSS shorthand sets the color, style, and width of a line around an element, outside of the border.

Live preview Example from MDN
#example-element {
  padding: 0.75rem;
  width: 80%;
  height: 100px;
}

In the reference

The example above is MDN's example for outline.

Browser support

First browser version supporting the whole outline feature
Chrome 94
Edge 94
Firefox 88
Safari 16.4
Chrome Android 94
Safari iOS 16.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

font-variant-alternates

Widely available since September 2025 Fonts

web-features The font-variant-alternates CSS property, along with the @font-feature-values at-rule, chooses when to use a font's alternate glyphs.

Live preview Example from MDN
@font-face {
  font-family: "MonteCarlo";
  src: url("https://developer.mozilla.org/shared-assets/fonts/monte-carlo/monte-carlo-regular.woff2");
}

@font-feature-values "MonteCarlo" {
  @swash {
    fancy: 1;
  }
}

p {
  font-family: "MonteCarlo", cursive;
  font-size: 3rem;
  margin: 0.7rem 3rem;
}

.variant {
  font-variant-alternates: swash(fancy);
}

In the reference

The example above is MDN's example for font-variant-alternates.

Browser support

First browser version supporting the whole font-variant-alternates feature
Chrome 111
Edge 111
Firefox 34
Safari 9.1
Chrome Android 111
Safari iOS 9.3

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Trigonometric functions (CSS)

Widely available since September 2025 CSS

web-features The sin(), cos(), tan(), asin(), acos(), atan(), and atan2() CSS functions compute various trigonometric functions.

Trigonometric functions (CSS) Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

Dashed chips belong to the same feature but this demo does not use them.

.demo-trig, .demo-trig * { box-sizing: border-box; }
.demo-trig { --rot: 0deg; --dx: 1px; --dy: 0px; max-width: 860px; margin: 0 auto; }
.demo-trig .hint { margin: 0 0 12px; }
.demo-trig .unsupported { display: none; margin: 0 0 12px; padding: 10px 12px; border: 2px dashed #b45309; border-radius: 8px; background: #fffbeb; }
@supports not (width: calc(sin(30deg) * 1px)) {
  .demo-trig .unsupported { display: block; }
}

.demo-trig .controls { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-weight: 600; }
.demo-trig .controls input { flex: 1; max-width: 420px; accent-color: #1d4ed8; }
.demo-trig .controls input:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }
.demo-trig output { min-width: 6ch; font-variant-numeric: tabular-nums; }

.demo-trig .ring { --r: 110px; position: relative; width: 300px; max-width: 100%; height: 280px; margin: 0 auto; }
.demo-trig .dot {
  /* The angle of each dot: its share of the circle plus the slider. */
  --a: calc(var(--i) * 30deg + var(--rot));
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  background: hsl(calc(var(--i) * 30) 75% 45%);
  /* cos() gives the horizontal share of the radius, sin() the vertical one. */
  translate: calc(cos(var(--a)) * var(--r)) calc(sin(var(--a)) * var(--r));
}

/* atan2(y, x) is the angle of the pointer seen from the middle: the arrow turns to it. */
.demo-trig .arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70px;
  height: 22px;
  margin: -11px 0 0 -35px;
  background: #1b1b1b;
  clip-path: polygon(0 30%, 60% 30%, 60% 0, 100% 50%, 60% 100%, 60% 70%, 0 70%);
  rotate: atan2(var(--dy), var(--dx));
}

.demo-trig .wave { display: flex; justify-content: space-between; align-items: center; height: 80px; margin-top: 8px; padding-inline: 4px; border-radius: 12px; background: #f1f5f9; }
.demo-trig .wave span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1d4ed8;
  translate: 0 calc(sin(var(--i) * 24deg + var(--rot)) * 28px);
}

@media (prefers-reduced-motion: no-preference) {
  .demo-trig .arrow { transition: rotate 0.1s; }
}

Browser support

First browser version supporting the whole Trigonometric functions (CSS) feature
Chrome 111
Edge 111
Firefox 108
Safari 15.4
Chrome Android 111
Safari iOS 15.4

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

color-gamut media query

Widely available since August 2025 Media queries

web-features The color-gamut media query sets styles based on the colors a device can display.

Live preview Example from MDN
abbr {
  color: #860304;
  font-weight: bold;
  transition: color 0.5s ease;
}

@media (hover: hover) {
  abbr:hover {
    color: #001ca8;
    transition-duration: 0.5s;
  }
}

@media not all and (hover: hover) {
  abbr::after {
    content: " (" attr(title) ")";
  }
}

In the reference

The example above is MDN's example for @media.

Browser support

First browser version supporting the whole color-gamut media query feature
Chrome 58
Edge 79
Firefox 110
Safari 10
Chrome Android 58
Safari iOS 10

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

Container queries (size)

Widely available since August 2025 Container queries

web-features Container size queries with the @container (…) at-rule apply styles to an element based on a dimension of its container, such as width or height.

Container queries (size) Written for this site

The features this demo is built on. Solid chips are used in its code, click one to read its definition.

Dashed chips belong to the same feature but this demo does not use them.

.demo-cq { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.demo-cq .hint { margin: 0; color: #555; font-size: 0.9rem; }

/* The dashed box is the container: a named query container on its inline axis. */
.demo-cq .frame {
  container: card / inline-size;
  box-sizing: border-box;
  width: 340px;
  min-width: 240px;
  max-width: 100%;
  resize: horizontal;
  overflow: auto;
  padding: 10px;
  border: 2px dashed #6a5af0;
  border-radius: 14px;
  background: #f4f2ff;
}

.demo-cq .card {
  display: grid;
  grid-template-areas: "art" "body" "buy";
  gap: 12px;
  padding: 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px #2a1f8a22;
}
.demo-cq .art {
  grid-area: art;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: radial-gradient(circle at 30% 30%, #ffe08a, transparent 40%), linear-gradient(135deg, #6a5af0, #e0489b);
}
.demo-cq .body { grid-area: body; display: grid; gap: 6px; align-content: start; }
.demo-cq .buy { grid-area: buy; display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Container query units: 1cqi is 1% of the container width. */
.demo-cq .title { margin: 0; font-size: clamp(1.1rem, 5cqi, 2rem); line-height: 1.15; }
.demo-cq .text { margin: 0; color: #444; font-size: 0.95rem; }
.demo-cq .specs { display: none; margin: 0; padding: 0; list-style: none; gap: 6px; flex-wrap: wrap; }
.demo-cq .specs li { padding: 2px 10px; border-radius: 99px; background: #ece9ff; color: #3b2fb0; font-size: 0.85rem; }
.demo-cq .price { font-size: 1.4rem; font-weight: 700; }
.demo-cq button {
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  background: #3b2fb0;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.demo-cq button:focus-visible { outline: 3px solid #e0489b; outline-offset: 2px; }

.demo-cq .mode { justify-self: start; padding: 1px 8px; border-radius: 4px; background: #1b1b1b; color: #fff; font-size: 0.75rem; }
.demo-cq .mode::before { content: "narrow layout"; }

@container card (width >= 26rem) {
  .demo-cq .card { grid-template-columns: 38% 1fr; grid-template-areas: "art body" "art buy"; }
  .demo-cq .art { aspect-ratio: auto; min-height: 10rem; }
  .demo-cq .specs { display: flex; }
  .demo-cq .mode::before { content: "medium layout"; }
}

@container card (width >= 42rem) {
  .demo-cq .card { grid-template-columns: 26% 1fr 11rem; grid-template-areas: "art body buy"; }
  .demo-cq .buy { flex-direction: column; align-items: stretch; justify-content: center; text-align: center; }
  .demo-cq .mode::before { content: "wide layout"; }
}

.demo-cq .unsupported { display: none; margin: 0; padding: 8px 12px; border-radius: 8px; background: #fff3cd; color: #5c4400; }
@supports not (container-type: inline-size) {
  .demo-cq .unsupported { display: block; }
}

Browser support

First browser version supporting the whole Container queries (size) feature
Chrome 105
Edge 105
Firefox 110
Safari 16
Chrome Android 105
Safari iOS 16

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification

MathML

Widely available since July 2025 MathML

web-features MathML, or the Mathematical Markup Language, describes mathematical notation, such as expressions and formulas. Also known as MathML Core.

Live preview Example from MDN
.example-container {
  width: 100%;
  height: 100%;
}

code {
  background: #88888888;
}

#example-element {
  border: 3px dashed orange;
}

.child {
  display: inline-block;
  padding: 0.5em 1em;
  background-color: #ccccff;
  border: 1px solid #ababab;
  color: black;
}

In the reference

The example above is MDN's example for display.

Browser support

First browser version supporting the whole MathML feature
Chrome 109
Edge 109
Firefox 4
Safari 5.1
Chrome Android 109
Safari iOS 5

First version supporting the feature as a whole, from web-features. Parts of it may have shipped earlier: see each key in the reference.

Specification