PluginProbe
Code Snippets / 4.0.0-beta.1
Code Snippets v4.0.0-beta.1
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
code-snippets / css / manage / _snippets-table.scss

_snippets-table.scss in Code Snippets 4.0.0-beta.1, at css/manage/_snippets-table.scss

300 lines 5.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 @use '../common/theme';
2
3 .column-name,
4 .column-type {
5 .dashicons {
6 font-size: 16px;
7 inline-size: 16px;
8 block-size: 16px;
9 vertical-align: middle;
10 }
11
12 .dashicons-clock {
13 vertical-align: middle;
14 }
15 }
16
17 .column-name .tooltip {
18 float: inline-end;
19
20 .dashicons-lock {
21 color: #646970;
22 opacity: 0.7;
23
24 &:hover {
25 opacity: 1;
26 }
27 }
28 }
29
30 .active-snippet .column-name > .snippet-name {
31 font-weight: 600;
32 }
33
34 // WP 7.0 changes the default admin link colour to the modern blue. Pin the classic accent on
35 // active rows (names and row-action links) so links keep their original colour; inactive rows
36 // are handled by the muted link-colors mixin below, and the trash button keeps its dark red
37 // from the `.delete` rule further down.
38 .wp-list-table .active-snippet a {
39 color: theme.$accent;
40
41 &:hover,
42 &:focus {
43 color: theme.$accent-hover;
44 }
45 }
46
47 // Status filter links (All | Active | Inactive | …): WP 7.0 recolours these with the modern
48 // blue. Restore the classic accent for non-current links; the current one keeps its own colour.
49 /* stylelint-disable-next-line no-descending-specificity -- unrelated element; ordering is fine. */
50 .subsubsub a:not(.current) {
51 color: theme.$accent;
52
53 &:hover,
54 &:focus {
55 color: theme.$accent-hover;
56 }
57 }
58
59 .active-snippet {
60 td, th {
61 background-color: rgba(#78c8e6, 0.06);
62 }
63
64 th.check-column {
65 border-inline-start: 2px solid #2ea2cc;
66 }
67 }
68
69 // `.wp-list-table` prefix keeps this above WP 7.0's 40px control height so the borderless
70 // priority field stays 30px tall and vertically aligned with the rest of the row.
71 .wp-list-table .priority-column input {
72 appearance: none;
73 background: none;
74 border: none;
75 box-shadow: none;
76 box-sizing: border-box;
77 min-block-size: theme.$control-height;
78 block-size: theme.$control-height;
79 inline-size: 4em;
80
81 // Pin the box model so padding/margins/line-height match WP 6.9 regardless of WP 7.0's
82 // taller default control metrics; this keeps the value aligned in both the resting and
83 // hovered (native spinner) states.
84 padding-block: 0;
85 padding-inline: 8px;
86 margin-block: 0;
87 margin-inline: 1px;
88 line-height: 2;
89 color: #666;
90 text-align: center;
91
92 &:disabled {
93 color: inherit;
94 }
95
96 &:hover, &:focus, &:active {
97 color: #000;
98 background-color: rgb(0 0 0 / 10%);
99 border-radius: 6px;
100 appearance: unset;
101
102 &:disabled {
103 color: inherit;
104 background-color: transparent;
105 }
106 }
107 }
108
109 .wp-list-table {
110 td.column-id {
111 text-align: center;
112 }
113
114 tr {
115 background: #fff;
116 }
117
118 ol, ul {
119 margin-block: 0 1.5em;
120 margin-inline: 1.5em 0;
121 }
122
123 ul {
124 list-style: disc;
125 }
126
127 th.sortable .list-table-sort-button,
128 th.sorted .list-table-sort-button {
129 display: flex;
130 flex-direction: row;
131 align-items: center;
132 inline-size: 100%;
133 margin: 0;
134 padding: 0;
135 border: none;
136 background: none;
137 font: inherit;
138 color: #2271b1;
139 cursor: pointer;
140 text-align: start;
141 }
142
143 th.sortable .list-table-sort-button:focus-visible,
144 th.sorted .list-table-sort-button:focus-visible {
145 outline: 2px solid #2271b1;
146 outline-offset: 2px;
147 border-radius: 2px;
148 }
149
150 .row-actions {
151 color: #646970;
152 position: relative;
153 inset-inline-start: 0;
154
155 // Row-action buttons render as plain inline links. On WP 7.0 the generic `.button`
156 // compatibility styling would otherwise give them a fill, border, radius and fixed
157 // height, so fully neutralise it here (this rule is emitted after the wp-admin layer
158 // at equal specificity, so it wins). Non-delete links inherit the accent text colour.
159 .button-link {
160 block-size: auto;
161 min-block-size: 0;
162 padding: 0;
163 border: 0;
164 border-radius: 0;
165 background: none;
166 box-shadow: none;
167 line-height: inherit;
168 font-weight: 400;
169
170 &:hover:not(:disabled),
171 &:focus:not(:disabled) {
172 background: none;
173 border: 0;
174 box-shadow: none;
175 }
176
177 &.delete {
178 color: #b32d2e;
179 }
180 }
181
182 .delete.disabled {
183 color: #a7aaad;
184 cursor: not-allowed;
185 pointer-events: none;
186 }
187 }
188
189 .column-activate {
190 padding-inline-end: 0 !important;
191 }
192
193 .clear-filters {
194 vertical-align: middle;
195 }
196
197 tfoot th.check-column {
198 padding: 13px 0 0 3px;
199 }
200
201 thead th.check-column,
202 tfoot th.check-column,
203 .inactive-snippet th.check-column {
204 padding-inline-start: 5px;
205 }
206
207 .active-snippet, .inactive-snippet {
208 td, th {
209 padding: 10px 9px;
210 border: none;
211 box-shadow: inset 0 -1px 0 rgb(0 0 0 / 10%);
212 }
213 }
214
215 tr.active-snippet + tr.inactive-snippet th,
216 tr.active-snippet + tr.inactive-snippet td {
217 border-block-start: 1px solid rgb(0 0 0 / 3%);
218 box-shadow: inset 0 1px 0 rgb(0 0 0 / 2%), inset 0 -1px 0 #e1e1e1;
219 }
220
221 .delete {
222 color: #b32d2e;
223 }
224
225 a.delete:not(.disabled) {
226 &:hover, &:focus, &:active {
227 border-block-end: 1px solid #f00;
228 color: #f00;
229 }
230 }
231
232 #wpbody-content & .column-name {
233 white-space: nowrap; /* prevents wrapping of snippet title */
234 }
235
236 td.column-date, th.column-date {
237 white-space: nowrap;
238 inline-size: 130px; /* fixed column width */
239 min-inline-size: 130px;
240 max-inline-size: 130px;
241 text-align: end;
242 overflow: hidden;
243 text-overflow: ellipsis;
244 }
245
246 td.column-date .modified-column-content {
247 display: block;
248 text-align: start;
249 }
250 }
251
252 .wp-list-table.truncate-row-values {
253 td.column-name > .snippet-name,
254 td.column-desc .snippet-description-content {
255 display: block;
256 overflow: hidden;
257 text-overflow: ellipsis;
258 }
259
260 td.column-name > .snippet-name {
261 max-inline-size: min(15rem, 30vw);
262 }
263
264 td.column-desc .snippet-description-content {
265 max-inline-size: min(25rem, 45vw);
266 }
267 }
268
269 .wp-core-ui .button.clear-filters {
270 vertical-align: baseline;
271 }
272
273 .inactive-snippet {
274 @include theme.link-colors(#579);
275 }
276
277
278 @media (width <= 782px) {
279 p.search-box {
280 float: inline-start;
281 position: initial;
282 margin-block: 1em 0;
283 margin-inline: 0;
284 block-size: auto;
285 }
286 }
287
288
289 .wp-list-table .is-expanded td.column-activate.activate {
290 /* fix for mobile layout */
291 display: table-cell !important;
292 }
293
294 .snippet-type-description {
295 border-block-end: 1px solid #ccc;
296 margin: 0;
297 padding-block: 1em;
298 padding-inline: 0;
299 }
300