|
| 1 | +// |
| 2 | +// Copyright 2026 Google LLC |
| 3 | +// SPDX-License-Identifier: Apache-2.0 |
| 4 | +// |
| 5 | + |
| 6 | +@mixin root { |
| 7 | + --container-color: transparent; |
| 8 | + --container-elevation: var(--md-sys-elevation-shadow-3); |
| 9 | + --container-height: 56px; |
| 10 | + --container-shape: var(--md-sys-shape-corner-lg); |
| 11 | + --icon-color: currentColor; |
| 12 | + --icon-label-space: 12px; |
| 13 | + --icon-size: 24px; |
| 14 | + --label-text: var(--md-sys-typescale-label-lg); |
| 15 | + --label-text-color: currentColor; |
| 16 | + --label-text-tracking: var(--md-sys-typescale-label-lg-tracking); |
| 17 | + --leading-space: 16px; |
| 18 | + --trailing-space: 16px; |
| 19 | +} |
| 20 | + |
| 21 | +@mixin hovered { |
| 22 | + --container-elevation: var(--md-sys-elevation-shadow-4); |
| 23 | +} |
| 24 | + |
| 25 | +@mixin pressed { |
| 26 | + --container-elevation: var(--md-sys-elevation-shadow-3); |
| 27 | +} |
| 28 | + |
| 29 | +@mixin primary-container { |
| 30 | + --container-color: var(--md-sys-color-primary-container); |
| 31 | + --icon-color: var(--md-sys-color-on-primary-container); |
| 32 | + --label-text-color: var(--md-sys-color-on-primary-container); |
| 33 | +} |
| 34 | + |
| 35 | +@mixin primary { |
| 36 | + --container-color: var(--md-sys-color-primary); |
| 37 | + --icon-color: var(--md-sys-color-on-primary); |
| 38 | + --label-text-color: var(--md-sys-color-on-primary); |
| 39 | +} |
| 40 | + |
| 41 | +@mixin secondary-container { |
| 42 | + --container-color: var(--md-sys-color-secondary-container); |
| 43 | + --icon-color: var(--md-sys-color-on-secondary-container); |
| 44 | + --label-text-color: var(--md-sys-color-on-secondary-container); |
| 45 | +} |
| 46 | + |
| 47 | +@mixin secondary { |
| 48 | + --container-color: var(--md-sys-color-secondary); |
| 49 | + --icon-color: var(--md-sys-color-on-secondary); |
| 50 | + --label-text-color: var(--md-sys-color-on-secondary); |
| 51 | +} |
| 52 | + |
| 53 | +@mixin tertiary-container { |
| 54 | + --container-color: var(--md-sys-color-tertiary-container); |
| 55 | + --icon-color: var(--md-sys-color-on-tertiary-container); |
| 56 | + --label-text-color: var(--md-sys-color-on-tertiary-container); |
| 57 | +} |
| 58 | + |
| 59 | +@mixin tertiary { |
| 60 | + --container-color: var(--md-sys-color-tertiary); |
| 61 | + --icon-color: var(--md-sys-color-on-tertiary); |
| 62 | + --label-text-color: var(--md-sys-color-on-tertiary); |
| 63 | +} |
| 64 | + |
| 65 | +@mixin md { |
| 66 | + --container-height: 80px; |
| 67 | + --container-shape: var(--md-sys-shape-corner-lg-increased); |
| 68 | + --icon-size: 28px; |
| 69 | + --label-text: var(--md-sys-typescale-title-lg); |
| 70 | + --label-text-tracking: var(--md-sys-typescale-title-lg-tracking); |
| 71 | + --leading-space: 26px; |
| 72 | + --trailing-space: 26px; |
| 73 | +} |
| 74 | + |
| 75 | +@mixin lg { |
| 76 | + --container-height: 96px; |
| 77 | + --container-shape: var(--md-sys-shape-corner-xl); |
| 78 | + --icon-label-space: 16px; |
| 79 | + --icon-size: 36px; |
| 80 | + --label-text: var(--md-sys-typescale-headline-sm); |
| 81 | + --label-text-tracking: var(--md-sys-typescale-headline-sm-tracking); |
| 82 | + --leading-space: 28px; |
| 83 | + --trailing-space: 28px; |
| 84 | +} |
0 commit comments