|
| 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 | +} |
| 18 | + |
| 19 | +:root { |
| 20 | + .sl-badge { |
| 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; |
| 49 | + } |
| 50 | + } |
| 51 | +} |
| 52 | + |
| 53 | +:root[data-theme="dark"] { |
| 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 | + } |
| 74 | + |
| 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 | + } |
| 84 | + } |
| 85 | +} |
0 commit comments