|
1 | | -:root { |
2 | | - --badge-background: #b9d6ff; |
3 | | - --badge-text: #002b67; |
| 1 | +.sl-badge { |
| 2 | + /* Unset Starlight styling */ |
| 3 | + border: none; |
| 4 | + font-family: var(--__sl-font); |
| 5 | + overflow-wrap: unset; |
| 6 | + |
| 7 | + /* Apply styling from https://www.npmjs.com/package/@cloudflare/component-label */ |
| 8 | + align-items: center; |
| 9 | + border-radius: 50px; |
| 10 | + display: inline-flex; |
| 11 | + font-size: 12px; |
| 12 | + font-weight: 400; |
| 13 | + line-height: 1; |
| 14 | + user-select: none; |
| 15 | + white-space: nowrap; |
| 16 | + padding: 4px 8px; |
| 17 | +} |
4 | 18 |
|
| 19 | +:root { |
5 | 20 | .sl-badge { |
6 | | - /* Unset Starlight styling */ |
7 | | - border: none; |
8 | | - font-family: var(--__sl-font); |
9 | | - overflow-wrap: unset; |
10 | | - |
11 | | - /* Apply styling from https://www.npmjs.com/package/@cloudflare/component-label */ |
12 | | - align-items: center; |
13 | | - border-radius: 50px; |
14 | | - display: inline-flex; |
15 | | - font-size: 12px; |
16 | | - font-weight: 400; |
17 | | - line-height: 1; |
18 | | - user-select: none; |
19 | | - white-space: nowrap; |
20 | | - padding: 4px 8px; |
21 | | - |
22 | | - background-color: var(--badge-background); |
23 | | - color: var(--badge-text); |
24 | | - |
25 | | - &.gray { |
26 | | - background-color: #d9d9d9; |
27 | | - color: #313131; |
| 21 | + &.note { |
| 22 | + background-color: theme("colors.cl1.blue.8") !important; |
| 23 | + color: theme("colors.cl1.blue.2") !important; |
| 24 | + } |
| 25 | + |
| 26 | + &.danger { |
| 27 | + background-color: theme("colors.cl1.red.8") !important; |
| 28 | + color: theme("colors.cl1.red.2") !important; |
| 29 | + } |
| 30 | + |
| 31 | + &.success { |
| 32 | + background-color: theme("colors.cl1.green.8") !important; |
| 33 | + color: theme("colors.cl1.green.2") !important; |
| 34 | + } |
| 35 | + |
| 36 | + &.caution { |
| 37 | + background-color: theme("colors.cl1.orange.8") !important; |
| 38 | + color: theme("colors.cl1.orange.2") !important; |
| 39 | + } |
| 40 | + |
| 41 | + &.tip { |
| 42 | + background-color: theme("colors.cl1.violet.8") !important; |
| 43 | + color: theme("colors.cl1.violet.1") !important; |
| 44 | + } |
| 45 | + |
| 46 | + &.default { |
| 47 | + background-color: theme("colors.cl1.gray.9") !important; |
| 48 | + color: theme("colors.cl1.gray.2") !important; |
28 | 49 | } |
29 | 50 | } |
30 | 51 | } |
31 | 52 |
|
32 | 53 | :root[data-theme="dark"] { |
33 | | - --badge-background: #f8a054; |
34 | | - --badge-text: #1d1d1d; |
| 54 | + .sl-badge { |
| 55 | + &.note { |
| 56 | + background-color: theme("colors.cl1.blue.7") !important; |
| 57 | + color: theme("colors.cl1.blue.0") !important; |
| 58 | + } |
| 59 | + |
| 60 | + &.danger { |
| 61 | + background-color: theme("colors.cl1.red.8") !important; |
| 62 | + color: theme("colors.cl1.red.0") !important; |
| 63 | + } |
| 64 | + |
| 65 | + &.success { |
| 66 | + background-color: theme("colors.cl1.green.7") !important; |
| 67 | + color: theme("colors.cl1.green.0") !important; |
| 68 | + } |
| 69 | + |
| 70 | + &.caution { |
| 71 | + background-color: theme("colors.cl1.orange.8") !important; |
| 72 | + color: theme("colors.cl1.orange.0") !important; |
| 73 | + } |
35 | 74 |
|
36 | | - .sl-badge.gray { |
37 | | - background-color: #b6b6b6; |
38 | | - color: #1d1d1d; |
| 75 | + &.tip { |
| 76 | + background-color: theme("colors.cl1.violet.8") !important; |
| 77 | + color: theme("colors.cl1.violet.0") !important; |
| 78 | + } |
| 79 | + |
| 80 | + &.default { |
| 81 | + background-color: theme("colors.cl1.gray.8") !important; |
| 82 | + color: theme("colors.cl1.gray.3") !important; |
| 83 | + } |
39 | 84 | } |
40 | 85 | } |
0 commit comments