| 1 |
@use '../badges'; |
| 2 |
@use '../checkbox'; |
| 3 |
@use '../theme'; |
| 4 |
|
| 5 |
.column-name { |
| 6 |
.extra-icons { |
| 7 |
float: inline-end; |
| 8 |
display: flex; |
| 9 |
flex-wrap: wrap; |
| 10 |
gap: 5px; |
| 11 |
} |
| 12 |
|
| 13 |
.dashicons-lock { |
| 14 |
color: #646970; |
| 15 |
opacity: 0.7; |
| 16 |
|
| 17 |
&:hover { |
| 18 |
opacity: 1; |
| 19 |
} |
| 20 |
} |
| 21 |
} |
| 22 |
|
| 23 |
.active-snippet { |
| 24 |
td, th { |
| 25 |
background-color: rgb(120 200 230 / 6%); |
| 26 |
} |
| 27 |
|
| 28 |
th.check-column { |
| 29 |
border-inline-start: 2px solid #2ea2cc; |
| 30 |
} |
| 31 |
|
| 32 |
.column-name > .snippet-name { |
| 33 |
font-weight: 600; |
| 34 |
} |
| 35 |
} |
| 36 |
|
| 37 |
.inactive-snippet { |
| 38 |
@include theme.link-colors(#579); |
| 39 |
} |
| 40 |
|
| 41 |
.paging-input { |
| 42 |
display: inline-flex; |
| 43 |
align-items: center; |
| 44 |
gap: 2px; |
| 45 |
} |
| 46 |
|
| 47 |
.wp-list-table { |
| 48 |
.check-column input[type='checkbox']='checkbox'] { |
| 49 |
@include checkbox.canonical; |
| 50 |
} |
| 51 |
|
| 52 |
// Shared cell rhythm for snippet and Cloud tables. Padding, rather than a |
| 53 |
// fixed row height, keeps multi-line values comfortable and uncropped. |
| 54 |
td, |
| 55 |
th { |
| 56 |
padding-block: 16px; |
| 57 |
padding-inline: 8px; |
| 58 |
} |
| 59 |
|
| 60 |
th:first-child, |
| 61 |
td:first-child { |
| 62 |
padding-inline-start: 16px; |
| 63 |
} |
| 64 |
|
| 65 |
th:last-child, |
| 66 |
td:last-child { |
| 67 |
padding-inline-end: 16px; |
| 68 |
} |
| 69 |
|
| 70 |
// Shared horizontal rhythm for every snippet table, so the cloud table lines |
| 71 |
// up with the snippets table rather than keeping the wider WordPress default. |
| 72 |
th:not(.check-column), |
| 73 |
td:not(.check-column) { |
| 74 |
padding-inline: 8px; |
| 75 |
} |
| 76 |
|
| 77 |
td.column-id { |
| 78 |
text-align: center; |
| 79 |
} |
| 80 |
|
| 81 |
tr { |
| 82 |
background: #fff; |
| 83 |
} |
| 84 |
|
| 85 |
ol, ul { |
| 86 |
margin-block: 0 1.5em; |
| 87 |
margin-inline: 1.5em 0; |
| 88 |
} |
| 89 |
|
| 90 |
ul { |
| 91 |
list-style: disc; |
| 92 |
} |
| 93 |
|
| 94 |
.sortable-column-title { |
| 95 |
display: flex; |
| 96 |
} |
| 97 |
|
| 98 |
th.sortable .list-table-sort-button, |
| 99 |
th.sorted .list-table-sort-button { |
| 100 |
display: flex; |
| 101 |
flex-direction: row; |
| 102 |
align-items: center; |
| 103 |
inline-size: 100%; |
| 104 |
margin: 0; |
| 105 |
border: none; |
| 106 |
background: none; |
| 107 |
font: inherit; |
| 108 |
color: theme.$accent; |
| 109 |
cursor: pointer; |
| 110 |
text-align: start; |
| 111 |
overflow: hidden; |
| 112 |
padding-block: 8px; |
| 113 |
padding-inline: 0; |
| 114 |
} |
| 115 |
|
| 116 |
th.sortable .list-table-sort-button:focus-visible, |
| 117 |
th.sorted .list-table-sort-button:focus-visible { |
| 118 |
outline: 2px solid theme.$accent; |
| 119 |
outline-offset: 2px; |
| 120 |
border-radius: 2px; |
| 121 |
} |
| 122 |
|
| 123 |
// The type badge is wrapped in an unclassed link that lays out as an inline |
| 124 |
// box shorter than the badge, so wrap the badge exactly and draw our own |
| 125 |
// focus ring: the inherited one resolves to a transparent outline. |
| 126 |
.column-type a { |
| 127 |
@include badges.badge-link; |
| 128 |
} |
| 129 |
|
| 130 |
.row-actions { |
| 131 |
color: #646970; |
| 132 |
position: relative; |
| 133 |
inset-inline-start: 0; |
| 134 |
|
| 135 |
a:not(.delete) { |
| 136 |
color: theme.$accent; |
| 137 |
|
| 138 |
&:hover, |
| 139 |
&:focus { |
| 140 |
color: theme.$accent-hover; |
| 141 |
} |
| 142 |
} |
| 143 |
|
| 144 |
// Row-action buttons render as plain inline links. On WP 7.0 the generic `.button` |
| 145 |
// compatibility styling would otherwise give them a fill, border, radius and fixed |
| 146 |
// height, so fully neutralise it here (this rule is emitted after the wp-admin layer |
| 147 |
// at equal specificity, so it wins). Non-delete links inherit the accent text colour. |
| 148 |
.button-link { |
| 149 |
block-size: auto; |
| 150 |
min-block-size: 0; |
| 151 |
padding: 0; |
| 152 |
border: 0; |
| 153 |
border-radius: 0; |
| 154 |
background: none; |
| 155 |
box-shadow: none; |
| 156 |
line-height: inherit; |
| 157 |
font-weight: 400; |
| 158 |
color: theme.$accent; |
| 159 |
|
| 160 |
&:hover:not(:disabled), |
| 161 |
&:focus:not(:disabled) { |
| 162 |
background: none; |
| 163 |
border: 0; |
| 164 |
box-shadow: none; |
| 165 |
} |
| 166 |
|
| 167 |
&:hover:not(:disabled, .delete, .snippet-cloud-update), |
| 168 |
&:focus:not(:disabled, .delete, .snippet-cloud-update) { |
| 169 |
color: theme.$accent-hover; |
| 170 |
} |
| 171 |
|
| 172 |
&.delete { |
| 173 |
color: #b32d2e; |
| 174 |
} |
| 175 |
|
| 176 |
&.snippet-cloud-update { |
| 177 |
color: #ff851b; |
| 178 |
} |
| 179 |
} |
| 180 |
|
| 181 |
.snippet-row-action-feedback, |
| 182 |
.snippet-row-action-error { |
| 183 |
display: inline-flex; |
| 184 |
align-items: center; |
| 185 |
gap: .5em; |
| 186 |
|
| 187 |
.components-spinner { |
| 188 |
margin: 0; |
| 189 |
inline-size: 1em; |
| 190 |
block-size: 1em; |
| 191 |
} |
| 192 |
} |
| 193 |
|
| 194 |
.snippet-row-action-error { |
| 195 |
color: #b32d2e; |
| 196 |
} |
| 197 |
|
| 198 |
.delete.disabled { |
| 199 |
color: #a7aaad; |
| 200 |
cursor: not-allowed; |
| 201 |
pointer-events: none; |
| 202 |
} |
| 203 |
} |
| 204 |
|
| 205 |
.column-activate { |
| 206 |
text-align: center; |
| 207 |
|
| 208 |
.snippet-activation-switch, |
| 209 |
input[type='checkbox']='checkbox'].switch { |
| 210 |
margin-inline: auto; |
| 211 |
} |
| 212 |
} |
| 213 |
|
| 214 |
.clear-filters { |
| 215 |
vertical-align: middle; |
| 216 |
} |
| 217 |
|
| 218 |
thead th.check-column, |
| 219 |
thead td.check-column, |
| 220 |
tfoot th.check-column, |
| 221 |
tfoot td.check-column, |
| 222 |
tbody th.check-column, |
| 223 |
tbody td.check-column { |
| 224 |
padding-block: 16px; |
| 225 |
padding-inline-start: 8px; |
| 226 |
vertical-align: middle; |
| 227 |
} |
| 228 |
|
| 229 |
// Line every checkbox up on the same starting edge. Rows flagged as active |
| 230 |
// draw a 2px accent border on this cell, so the same width is reserved as a |
| 231 |
// transparent border elsewhere; without it the header, footer and inactive |
| 232 |
// rows sit 2px further in, and rows shift as snippets are toggled. |
| 233 |
thead th.check-column, |
| 234 |
thead td.check-column, |
| 235 |
tfoot th.check-column, |
| 236 |
tfoot td.check-column, |
| 237 |
tbody tr:not(.active-snippet) th.check-column, |
| 238 |
tbody tr:not(.active-snippet) td.check-column { |
| 239 |
border-inline-start: 2px solid transparent; |
| 240 |
} |
| 241 |
|
| 242 |
.active-snippet, .inactive-snippet { |
| 243 |
td, th { |
| 244 |
box-shadow: inset 0 -1px 0 rgb(0 0 0 / 10%); |
| 245 |
vertical-align: middle; |
| 246 |
} |
| 247 |
} |
| 248 |
|
| 249 |
tr.active-snippet + tr.inactive-snippet th, |
| 250 |
tr.active-snippet + tr.inactive-snippet td { |
| 251 |
border-block-start: 1px solid rgb(0 0 0 / 3%); |
| 252 |
box-shadow: inset 0 1px 0 rgb(0 0 0 / 2%), inset 0 -1px 0 #e1e1e1; |
| 253 |
} |
| 254 |
|
| 255 |
.delete { |
| 256 |
color: #b32d2e; |
| 257 |
} |
| 258 |
|
| 259 |
a.delete:not(.disabled) { |
| 260 |
&:hover, &:focus, &:active { |
| 261 |
border-block-end: 1px solid #f00; |
| 262 |
color: #f00; |
| 263 |
} |
| 264 |
} |
| 265 |
|
| 266 |
td.column-date, th.column-date { |
| 267 |
white-space: nowrap; |
| 268 |
inline-size: 130px; /* fixed column width */ |
| 269 |
min-inline-size: 130px; |
| 270 |
max-inline-size: 130px; |
| 271 |
text-align: end; |
| 272 |
overflow: hidden; |
| 273 |
text-overflow: ellipsis; |
| 274 |
} |
| 275 |
|
| 276 |
td.column-date .modified-column-content { |
| 277 |
display: block; |
| 278 |
text-align: start; |
| 279 |
} |
| 280 |
|
| 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; |
| 285 |
max-inline-size: min(15rem, 30vw); |
| 286 |
white-space: nowrap; |
| 287 |
overflow: hidden; |
| 288 |
text-overflow: ellipsis; |
| 289 |
} |
| 290 |
|
| 291 |
&.truncate-row-values td.column-desc .snippet-description-content { |
| 292 |
display: block; |
| 293 |
max-inline-size: min(25rem, 45vw); |
| 294 |
overflow: clip; |
| 295 |
text-overflow: ellipsis; |
| 296 |
} |
| 297 |
} |
| 298 |
|
| 299 |
.snippets-table-toolbar { |
| 300 |
display: flex; |
| 301 |
justify-content: space-between; |
| 302 |
align-items: center; |
| 303 |
|
| 304 |
// The preceding page header owns the 16px gap above; a `wp-header-end` <hr> |
| 305 |
// sits between them and prevents margin collapse, so this row keeps only its |
| 306 |
// own 16px gap below (to the tablenav) and no top margin of its own. |
| 307 |
margin-block: 0 16px; |
| 308 |
|
| 309 |
.subsubsub { |
| 310 |
display: flex; |
| 311 |
align-items: center; |
| 312 |
gap: 9px; |
| 313 |
margin: 0; |
| 314 |
padding: 0; |
| 315 |
font-size: 13px; |
| 316 |
line-height: 1.5; |
| 317 |
|
| 318 |
li { |
| 319 |
display: flex; |
| 320 |
align-items: center; |
| 321 |
gap: 9px; |
| 322 |
margin: 0; |
| 323 |
padding: 0; |
| 324 |
} |
| 325 |
|
| 326 |
// A thin vertical rule precedes every status after the first, sized to the |
| 327 |
// 13px text rather than the taller line box. |
| 328 |
li + li::before { |
| 329 |
content: ''; |
| 330 |
inline-size: 1px; |
| 331 |
block-size: 13px; |
| 332 |
background: theme.$control-border; |
| 333 |
} |
| 334 |
} |
| 335 |
} |
| 336 |
|