|
2 | 2 | --admincraft-dirt: #805539; |
3 | 3 | --admincraft-grass: #5f7f3b; |
4 | 4 | --admincraft-ink: #252018; |
5 | | - --md-primary-fg-color: #6f4933; |
6 | | - --md-primary-fg-color--light: #94684a; |
7 | | - --md-primary-fg-color--dark: #4b3022; |
8 | | - --md-accent-fg-color: #658746; |
| 5 | + --admincraft-sand: #e3d3bd; |
9 | 6 | } |
10 | 7 |
|
11 | 8 | /* Tint Material's own schemes rather than declaring new ones. |
|
19 | 16 | --md-default-bg-color: #fbf9f4; |
20 | 17 | --md-default-fg-color: var(--admincraft-ink); |
21 | 18 | --md-code-bg-color: #eee9dd; |
| 19 | + /* These sat on :root, where Material's own scheme block outranked them, so |
| 20 | + * light mode kept the stock indigo for links and buttons under a brown and |
| 21 | + * green header. They have to be set on the scheme itself to take. */ |
| 22 | + --md-primary-fg-color: #6f4933; |
| 23 | + --md-primary-fg-color--light: #94684a; |
| 24 | + --md-primary-fg-color--dark: #4b3022; |
| 25 | + --md-accent-fg-color: #658746; |
22 | 26 | } |
23 | 27 |
|
24 | 28 | [data-md-color-scheme="slate"] { |
|
93 | 97 | border-color: var(--admincraft-grass) !important; |
94 | 98 | } |
95 | 99 |
|
| 100 | +/* An outlined button takes its text and border from --md-primary-fg-color, |
| 101 | + * which is the header colour. That is a dark brown here, so on the dark page |
| 102 | + * the secondary button sat at 1.7:1 against its own background: drawn, but not |
| 103 | + * visible. Material's hover then paints it with the accent and writes on it in |
| 104 | + * --md-accent-bg-color, which slate leaves as white, giving 2.1:1 on light |
| 105 | + * green. Both need a foreground chosen for this background rather than |
| 106 | + * inherited from the header. */ |
| 107 | +[data-md-color-scheme="slate"] .md-button { |
| 108 | + color: var(--admincraft-sand); |
| 109 | +} |
| 110 | + |
| 111 | +[data-md-color-scheme="slate"] .md-button:focus, |
| 112 | +[data-md-color-scheme="slate"] .md-button:hover { |
| 113 | + color: var(--admincraft-ink); |
| 114 | +} |
| 115 | + |
96 | 116 | @media (max-width: 44.9844em) { |
97 | 117 | .admincraft-hero { |
98 | 118 | padding: 1.5rem 1rem; |
|
0 commit comments