|
| 1 | +// |
| 2 | +// Copyright 2026 Google LLC |
| 3 | +// SPDX-License-Identifier: Apache-2.0 |
| 4 | +// |
| 5 | + |
| 6 | +@mixin root { |
| 7 | + --container-color: var(--md-sys-color-surface-container-low); |
| 8 | + --container-elevation: var(--md-sys-elevation-shadow-2); |
| 9 | + --container-shape: var(--md-sys-shape-corner-lg); |
| 10 | + --gap: 2px; |
| 11 | + --group-padding: 2px; |
| 12 | + --group-shape: var(--md-sys-shape-corner-sm); |
| 13 | + --section-label-text-color: var(--md-sys-color-on-surface-variant); |
| 14 | +} |
| 15 | + |
| 16 | +@mixin inactive { |
| 17 | + --container-shape: var(--md-sys-shape-corner-sm); |
| 18 | +} |
| 19 | + |
| 20 | +@mixin active { |
| 21 | + --container-shape: var(--md-sys-shape-corner-md); |
| 22 | +} |
| 23 | + |
| 24 | +@mixin vibrant { |
| 25 | + --container-color: var(--md-sys-color-tertiary-container); |
| 26 | +} |
| 27 | + |
| 28 | +@mixin item { |
| 29 | + --between-space: 12px; |
| 30 | + --bottom-space: 8px; |
| 31 | + --container-color: transparent; |
| 32 | + --height: 44px; |
| 33 | + --inner-corner-corner-size: none; |
| 34 | + --label-text-color: var(--md-sys-color-on-surface); |
| 35 | + --label-text: var(--md-sys-typescale-label-lg); |
| 36 | + --label-text-tracking: var(--md-sys-typescale-label-lg-tracking); |
| 37 | + --leading-icon-color: var(--md-sys-color-on-surface-variant); |
| 38 | + --leading-icon-size: 20px; |
| 39 | + --leading-space: 16px; |
| 40 | + --shape: var(--md-sys-shape-corner-xs); |
| 41 | + --supporting-text-color: var(--md-sys-color-on-surface-variant); |
| 42 | + --supporting-text: var(--md-sys-typescale-body-sm); |
| 43 | + --supporting-text-tracking: var(--md-sys-typescale-body-sm-tracking); |
| 44 | + --top-space: 8px; |
| 45 | + --trailing-icon-color: var(--md-sys-color-on-surface-variant); |
| 46 | + --trailing-icon-size: 20px; |
| 47 | + --trailing-space: 16px; |
| 48 | + --trailing-supporting-text-color: var(--md-sys-color-on-surface-variant); |
| 49 | + --trailing-supporting-text: var(--md-sys-typescale-label-lg); |
| 50 | + --trailing-supporting-text-tracking: var(--md-sys-typescale-label-lg-tracking); |
| 51 | +} |
| 52 | + |
| 53 | +@mixin item-first-child { |
| 54 | + --inner-corner-corner-size: var(--md-sys-shape-corner-xs); |
| 55 | + --shape: var(--md-sys-shape-corner-md); |
| 56 | +} |
| 57 | + |
| 58 | +@mixin item-last-child { |
| 59 | + --inner-corner-corner-size: var(--md-sys-shape-corner-xs); |
| 60 | + --shape: var(--md-sys-shape-corner-md); |
| 61 | +} |
| 62 | + |
| 63 | +@mixin item-vibrant { |
| 64 | + --label-text-color: var(--md-sys-color-on-tertiary-container); |
| 65 | + --leading-icon-color: var(--md-sys-color-on-tertiary-container); |
| 66 | + --supporting-text-color: var(--md-sys-color-on-tertiary-container); |
| 67 | + --trailing-icon-color: var(--md-sys-color-on-tertiary-container); |
| 68 | + --trailing-supporting-text-color: var(--md-sys-color-on-tertiary-container); |
| 69 | +} |
| 70 | + |
| 71 | +@mixin item-vibrant-hovered { |
| 72 | + --leading-icon-color: var(--md-sys-color-tertiary); |
| 73 | + --trailing-icon-color: var(--md-sys-color-tertiary); |
| 74 | +} |
| 75 | + |
| 76 | +@mixin item-vibrant-focused { |
| 77 | + --leading-icon-color: var(--md-sys-color-tertiary); |
| 78 | + --trailing-icon-color: var(--md-sys-color-tertiary); |
| 79 | +} |
| 80 | + |
| 81 | +@mixin item-vibrant-pressed { |
| 82 | + --leading-icon-color: var(--md-sys-color-tertiary); |
| 83 | + --trailing-icon-color: var(--md-sys-color-tertiary); |
| 84 | +} |
| 85 | + |
| 86 | +@mixin item-selected { |
| 87 | + --container-color: var(--md-sys-color-tertiary-container); |
| 88 | + --label-text-color: var(--md-sys-color-on-tertiary-container); |
| 89 | + --leading-icon-color: var(--md-sys-color-on-tertiary-container); |
| 90 | + --shape: var(--md-sys-shape-corner-md); |
| 91 | + --supporting-text-color: var(--md-sys-color-on-tertiary-container); |
| 92 | + --trailing-icon-color: var(--md-sys-color-on-tertiary-container); |
| 93 | + --trailing-supporting-text-color: var(--md-sys-color-on-tertiary-container); |
| 94 | +} |
| 95 | + |
| 96 | +@mixin item-selected-vibrant { |
| 97 | + --container-color: var(--md-sys-color-tertiary); |
| 98 | + --label-text-color: var(--md-sys-color-on-tertiary); |
| 99 | + --leading-icon-color: var(--md-sys-color-on-tertiary); |
| 100 | + --supporting-text-color: var(--md-sys-color-on-tertiary); |
| 101 | + --trailing-icon-color: var(--md-sys-color-on-tertiary); |
| 102 | + --trailing-supporting-text-color: var(--md-sys-color-on-tertiary); |
| 103 | +} |
| 104 | + |
| 105 | +@mixin item-disabled { |
| 106 | + --label-text-color: hsl(from var(--md-sys-color-on-surface) h s l / 38%); |
| 107 | + --leading-icon-color: hsl(from var(--md-sys-color-on-surface) h s l / 38%); |
| 108 | + --supporting-text-color: hsl(from var(--md-sys-color-on-surface) h s l / 38%); |
| 109 | + --trailing-icon-color: hsl(from var(--md-sys-color-on-surface) h s l / 38%); |
| 110 | + --trailing-supporting-text-color: hsl(from var(--md-sys-color-on-surface) h s l / 38%); |
| 111 | +} |
| 112 | + |
| 113 | +@mixin item-disabled-vibrant { |
| 114 | + --label-text-color: hsl(from var(--md-sys-color-on-tertiary-container) h s l / 38%); |
| 115 | + --leading-icon-color: hsl(from var(--md-sys-color-on-tertiary-container) h s l / 38%); |
| 116 | + --supporting-text-color: hsl(from var(--md-sys-color-on-tertiary-container) h s l / 38%); |
| 117 | + --trailing-icon-color: hsl(from var(--md-sys-color-on-tertiary-container) h s l / 38%); |
| 118 | + --trailing-supporting-text-color: hsl(from var(--md-sys-color-on-tertiary-container) h s l / 38%); |
| 119 | +} |
| 120 | + |
| 121 | +@mixin item-disabled-selected { |
| 122 | + --container-color: hsl(from var(--md-sys-color-tertiary-container) h s l / 38%); |
| 123 | + --label-text-color: hsl(from var(--md-sys-color-on-tertiary-container) h s l / 38%); |
| 124 | + --leading-icon-color: hsl(from var(--md-sys-color-on-tertiary-container) h s l / 38%); |
| 125 | + --supporting-text-color: hsl(from var(--md-sys-color-on-tertiary-container) h s l / 38%); |
| 126 | + --trailing-icon-color: hsl(from var(--md-sys-color-on-tertiary-container) h s l / 38%); |
| 127 | + --trailing-supporting-text-color: hsl(from var(--md-sys-color-on-tertiary-container) h s l / 38%); |
| 128 | +} |
0 commit comments