Skip to content

Add layered shadows, shadow theme variant utilities, shadow-xs, and keyline border width.#42675

Merged
mdo merged 10 commits into
v6-devfrom
v6-shadows-keyline-border
Jul 17, 2026
Merged

Add layered shadows, shadow theme variant utilities, shadow-xs, and keyline border width.#42675
mdo merged 10 commits into
v6-devfrom
v6-shadows-keyline-border

Conversation

@mdo

@mdo mdo commented Jul 15, 2026

Copy link
Copy Markdown
Member

Introduces a themeable, layered shadow system plus a .5px keyline border width, and wires them through components and docs.

  • Layered shadow system (775aea8ef): reworks --box-shadow-* tokens into multi-layer shadows built from three new tokens:
    • --shadow-color — retints every shadow (drives .shadow-{color} utilities, e.g. .shadow-primary)
    • --shadow-opacity — dims/boosts shadows (drives .shadow-opacity-*)
    • --shadow-strength — deepens all shadows, bumped automatically in dark mode
    • Each layer's alpha is base * strength * opacity via oklch(from …), and utilities emit the literal layered expressions so the nested vars resolve on the element.
    • Adds a new .shadow-xl size; applied across _dialog, _drawer, and _menu.
  • Keyline borders (555aa6c31): adds --border-width-keyline: .5px and a keyline border width, with docs examples on header menus + search input.
  • .shadow-xs (001ee7ad8, cherry-picked from 9ec72b67e): adds a themed --box-shadow-xs token (single subtle layer, consistent with the layered system) and .shadow-xs utility. Reconciled with the layered token style during cherry-pick.
  • Docs: documents shadow color, opacity, strength, .shadow-xl/.shadow-xs, and keyline usage.

Notes

  • The cherry-picked .shadow-xs commit originally used the old flat rgb() shadow values; it was adapted here to the new layered oklch() token format so it stays consistent with the rest of the system.
  • No local JS/Sass toolchain was available to run npm run dist / css-lint, so the dist/ artifacts are not regenerated in this branch. Recommend running the full build before merge.

@mdo
mdo requested a review from a team as a code owner July 15, 2026 04:49
@mdo mdo added this to v6.0.0 Jul 15, 2026
@github-project-automation github-project-automation Bot moved this to Inbox in v6.0.0 Jul 15, 2026
@mdo
mdo force-pushed the v6-shadows-keyline-border branch from 001ee7a to df98db6 Compare July 15, 2026 05:37
@coliff

coliff commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@mdo mdo changed the title Add themed shadow utilities and keyline borders Add layered shadows, shadow theme variant utilities, shadow-xs, and keyline border width. Jul 16, 2026
mdo added 10 commits July 16, 2026 19:48
Introduce a smaller box shadow between the existing default and sm sizes,
and expose it through the shadow utilities.
Shadow color and opacity utilities now compose through local --sc/--so
variables (like --bc for border-color) instead of setting --shadow-color
and --shadow-opacity directly, so .shadow-{color} and .shadow-opacity-*
no longer leak into nested .shadow-* descendants. The $shadows map
(scss/_config.scss) reads var(--sc, var(--shadow-color)) and
var(--so, 1), keeping --shadow-color/--shadow-strength as the
cascading global defaults. Removes the now-unused at-property utility
key since no utility needs the cascading opt-out anymore.

Updates the shadows docs with a nested-elements example and callout,
and adds a migration guide entry.
@mdo
mdo force-pushed the v6-shadows-keyline-border branch from 81986c7 to 705fce5 Compare July 17, 2026 02:50
@mdo
mdo merged commit 16a4016 into v6-dev Jul 17, 2026
12 checks passed
@mdo
mdo deleted the v6-shadows-keyline-border branch July 17, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

2 participants