| @@ -10,9 +10,9 @@ | ||
| 10 | 10 | gap: 5px; |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | .dashicons-lock { |
| 14 | - color: #646970; | |
| 14 | + color: var(--cs-color-text-muted); | |
| 15 | 15 | opacity: 0.7; |
| 16 | 16 | |
| 17 | 17 | &:hover { |
| 18 | 18 | opacity: 1; |
| @@ -34,9 +34,22 @@ | ||
| 34 | 34 | } |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | .inactive-snippet { |
| 38 | - @include theme.link-colors(#579); | |
| 38 | + a { | |
| 39 | + color: #579; | |
| 40 | + | |
| 41 | + &:hover, | |
| 42 | + &:active, | |
| 43 | + &:focus { | |
| 44 | + color: #819db9; | |
| 45 | + box-shadow: none; | |
| 46 | + } | |
| 47 | + | |
| 48 | + &:focus-visible { | |
| 49 | + outline: 2px solid var(--cs-color-accent); | |
| 50 | + } | |
| 51 | + } | |
| 39 | 52 | } |
| 40 | 53 | |
| 41 | 54 | .paging-input { |
| 42 | 55 | display: inline-flex; |
| @@ -78,9 +91,9 @@ | ||
| 78 | 91 | text-align: center; |
| 79 | 92 | } |
| 80 | 93 | |
| 81 | 94 | tr { |
| 82 | - background: #fff; | |
| 95 | + background: var(--cs-color-surface); | |
| 83 | 96 | } |
| 84 | 97 | |
| 85 | 98 | ol, ul { |
| 86 | 99 | margin-block: 0 1.5em; |
| @@ -104,9 +117,9 @@ | ||
| 104 | 117 | margin: 0; |
| 105 | 118 | border: none; |
| 106 | 119 | background: none; |
| 107 | 120 | font: inherit; |
| 108 | - color: theme.$accent; | |
| 121 | + color: var(--cs-color-accent); | |
| 109 | 122 | cursor: pointer; |
| 110 | 123 | text-align: start; |
| 111 | 124 | overflow: hidden; |
| 112 | 125 | padding-block: 8px; |
| @@ -114,11 +127,11 @@ | ||
| 114 | 127 | } |
| 115 | 128 | |
| 116 | 129 | th.sortable .list-table-sort-button:focus-visible, |
| 117 | 130 | th.sorted .list-table-sort-button:focus-visible { |
| 118 | - outline: 2px solid theme.$accent; | |
| 131 | + outline: 2px solid var(--cs-color-accent); | |
| 119 | 132 | outline-offset: 2px; |
| 120 | - border-radius: 2px; | |
| 133 | + border-radius: 5px; | |
| 121 | 134 | } |
| 122 | 135 | |
| 123 | 136 | // The type badge is wrapped in an unclassed link that lays out as an inline |
| 124 | 137 | // box shorter than the badge, so wrap the badge exactly and draw our own |
| @@ -123,23 +136,47 @@ | ||
| 123 | 136 | // The type badge is wrapped in an unclassed link that lays out as an inline |
| 124 | 137 | // box shorter than the badge, so wrap the badge exactly and draw our own |
| 125 | 138 | // focus ring: the inherited one resolves to a transparent outline. |
| 126 | 139 | .column-type a { |
| 127 | - @include badges.badge-link; | |
| 140 | + display: inline-flex; | |
| 141 | + border-radius: 5px; | |
| 142 | + | |
| 143 | + &:focus { | |
| 144 | + box-shadow: none; | |
| 145 | + } | |
| 146 | + | |
| 147 | + &:focus-visible { | |
| 148 | + outline: 2px solid var(--cs-color-accent); | |
| 149 | + } | |
| 128 | 150 | } |
| 129 | 151 | |
| 130 | 152 | .row-actions { |
| 131 | - color: #646970; | |
| 153 | + color: var(--cs-color-text-muted); | |
| 132 | 154 | position: relative; |
| 133 | 155 | inset-inline-start: 0; |
| 134 | 156 | |
| 157 | + // Anchor inline dashicons (e.g. the trash glyph on the Delete action) to | |
| 158 | + // the surrounding text. WP's `.wp-core-ui .button .dashicons` rule sets | |
| 159 | + // line-height: 1.9, which would drop the glyph below the link baseline, | |
| 160 | + // and the icon should inherit the link's colour rather than link blue. | |
| 161 | + .button .dashicons { | |
| 162 | + line-height: 1; | |
| 163 | + vertical-align: text-bottom; | |
| 164 | + color: inherit; | |
| 165 | + } | |
| 166 | + | |
| 135 | 167 | a:not(.delete) { |
| 136 | - color: theme.$accent; | |
| 168 | + color: var(--cs-color-accent); | |
| 137 | 169 | |
| 138 | 170 | &:hover, |
| 139 | 171 | &:focus { |
| 140 | - color: theme.$accent-hover; | |
| 172 | + color: var(--cs-color-accent-hover); | |
| 173 | + box-shadow: none; | |
| 141 | 174 | } |
| 175 | + | |
| 176 | + &:focus-visible { | |
| 177 | + outline: 2px solid var(--cs-color-accent); | |
| 178 | + } | |
| 142 | 179 | } |
| 143 | 180 | |
| 144 | 181 | // Row-action buttons render as plain inline links. On WP 7.0 the generic `.button` |
| 145 | 182 | // compatibility styling would otherwise give them a fill, border, radius and fixed |
| @@ -154,10 +191,14 @@ | ||
| 154 | 191 | background: none; |
| 155 | 192 | box-shadow: none; |
| 156 | 193 | line-height: inherit; |
| 157 | 194 | font-weight: 400; |
| 158 | - color: theme.$accent; | |
| 195 | + color: var(--cs-color-accent); | |
| 159 | 196 | |
| 197 | + &:focus { | |
| 198 | + outline: 2px solid var(--cs-color-accent); | |
| 199 | + } | |
| 200 | + | |
| 160 | 201 | &:hover:not(:disabled), |
| 161 | 202 | &:focus:not(:disabled) { |
| 162 | 203 | background: none; |
| 163 | 204 | border: 0; |
| @@ -165,13 +206,13 @@ | ||
| 165 | 206 | } |
| 166 | 207 | |
| 167 | 208 | &:hover:not(:disabled, .delete, .snippet-cloud-update), |
| 168 | 209 | &:focus:not(:disabled, .delete, .snippet-cloud-update) { |
| 169 | - color: theme.$accent-hover; | |
| 210 | + color: var(--cs-color-accent-hover); | |
| 170 | 211 | } |
| 171 | 212 | |
| 172 | 213 | &.delete { |
| 173 | - color: #b32d2e; | |
| 214 | + color: var(--cs-color-error); | |
| 174 | 215 | } |
| 175 | 216 | |
| 176 | 217 | &.snippet-cloud-update { |
| 177 | 218 | color: #ff851b; |
| @@ -191,13 +232,13 @@ | ||
| 191 | 232 | } |
| 192 | 233 | } |
| 193 | 234 | |
| 194 | 235 | .snippet-row-action-error { |
| 195 | - color: #b32d2e; | |
| 236 | + color: var(--cs-color-error); | |
| 196 | 237 | } |
| 197 | 238 | |
| 198 | 239 | .delete.disabled { |
| 199 | - color: #a7aaad; | |
| 240 | + color: var(--cs-color-text-disabled); | |
| 200 | 241 | cursor: not-allowed; |
| 201 | 242 | pointer-events: none; |
| 202 | 243 | } |
| 203 | 244 | } |
| @@ -252,9 +293,9 @@ | ||
| 252 | 293 | box-shadow: inset 0 1px 0 rgb(0 0 0 / 2%), inset 0 -1px 0 #e1e1e1; |
| 253 | 294 | } |
| 254 | 295 | |
| 255 | 296 | .delete { |
| 256 | - color: #b32d2e; | |
| 297 | + color: var(--cs-color-error); | |
| 257 | 298 | } |
| 258 | 299 | |
| 259 | 300 | a.delete:not(.disabled) { |
| 260 | 301 | &:hover, &:focus, &:active { |
| @@ -277,16 +318,15 @@ | ||
| 277 | 318 | display: block; |
| 278 | 319 | text-align: start; |
| 279 | 320 | } |
| 280 | 321 | |
| 281 | - // Snippet names always stay on a single line, truncating gracefully; | |
| 282 | - // the full name is exposed through the title attribute. | |
| 283 | - td.column-name > .snippet-name { | |
| 284 | - display: block; | |
| 322 | + // Names and descriptions are both governed by the "Truncate long snippet | |
| 323 | + // names and descriptions" Screen Option. When it is off, the name group may | |
| 324 | + // take the full cell; when on, it is capped and the name inside it | |
| 325 | + // truncates, with the full value available through the title attribute. | |
| 326 | + &.truncate-row-values td.column-name > .snippet-name-group { | |
| 327 | + display: flex; | |
| 285 | 328 | max-inline-size: min(15rem, 30vw); |
| 286 | - white-space: nowrap; | |
| 287 | - overflow: hidden; | |
| 288 | - text-overflow: ellipsis; | |
| 289 | 329 | } |
| 290 | 330 | |
| 291 | 331 | &.truncate-row-values td.column-desc .snippet-description-content { |
| 292 | 332 | display: block; |
| @@ -328,8 +368,8 @@ | ||
| 328 | 368 | li + li::before { |
| 329 | 369 | content: ''; |
| 330 | 370 | inline-size: 1px; |
| 331 | 371 | block-size: 13px; |
| 332 | - background: theme.$control-border; | |
| 372 | + background: var(--cs-color-border); | |
| 333 | 373 | } |
| 334 | 374 | } |
| 335 | 375 | } |