diff --git a/resources/css/showcase.css b/resources/css/showcase.css index d7f0bd47..37d4e7b1 100644 --- a/resources/css/showcase.css +++ b/resources/css/showcase.css @@ -261,4 +261,19 @@ border-radius: var(--md-sys-shape-corner-full); background-color: var(--md-sys-color-tertiary); } + + /* Icons: one search result's mask (its `mask` shorthand is the fetched symbol, so it stays the + view's own x-bind:style), 24px by default and 20px once optical size 20 is on — the state a + script toggles as data-md-showcase-icon-size, never a class. */ + [data-md-showcase-icon-mask] { + display: block; + width: 24px; + height: 24px; + background-color: currentColor; + } + + [data-md-showcase-icon-mask][data-md-showcase-icon-size='20'] { + width: 20px; + height: 20px; + } } diff --git a/resources/views/showcase/sections/icons.blade.php b/resources/views/showcase/sections/icons.blade.php index bba669a6..6d94aae3 100644 --- a/resources/views/showcase/sections/icons.blade.php +++ b/resources/views/showcase/sections/icons.blade.php @@ -1,6 +1,7 @@ -
-

Icons

+

Icons

-

+

Every Material Symbol (Rounded, 400, grade 0) as <x-icon name="…" />, outlined or filled, drawn from the optical size 24 cut or — for an icon 20px or smaller, where 24's strokes would look thin — - the 20 cut: <x-icon name="…" optical="20" class="size-5" />. + the 20 cut: <x-icon name="…" optical="20" />.

-

+

filled means active or selected; optical="20" when an icon is drawn at 20px or less; one weight per group. An icon takes the size and colour of the text beside it. An icon-only control carries an accessible name; a decorative icon is hidden.

-
- + + + + + - - - -
- - -
+ +