PluginProbe
Code Snippets / trunk
Code Snippets vtrunk
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
← All changes | css/common/_toolbar.scss +154 -49 3.10.2 → trunk View file →
@@ -1,22 +1,18 @@
1 -@use 'theme';
2 1 @use 'upsell';
3 2
4 -$toolbar-block-size: 136px;
5 -$wpcontent-inline-start-indent: 20px;
6 -
7 3 #wpbody {
8 - padding-block-start: $toolbar-block-size;
4 + padding-block-start: var(--cs-toolbar-block-size);
9 5 }
10 6
11 7 .code-snippets-toolbar {
12 - color: #2c3337;
13 - background: #fff;
8 + color: var(--cs-color-text);
9 + background: var(--cs-color-surface);
14 10 font-family: 'SF Pro', sans-serif;
15 - margin-inline-start: -$wpcontent-inline-start-indent - 2;
11 + margin-inline-start: calc(-1 * var(--cs-wpcontent-inline-start-indent) - 2px);
16 12 position: absolute;
17 - inline-size: calc(100% + $wpcontent-inline-start-indent);
18 - block-size: $toolbar-block-size;
13 + inline-size: calc(100% + var(--cs-wpcontent-inline-start-indent));
14 + block-size: var(--cs-toolbar-block-size);
19 15 inset-block-start: 0;
20 16 display: flex;
21 17 flex-direction: column;
22 18
@@ -51,14 +47,8 @@
51 47 font-weight: 700;
52 48 }
53 49 }
54 50
55 - h1 {
56 - font-size: 18px;
57 - font-weight: 700;
58 - line-height: 1.5;
59 - }
60 -
61 51 ul {
62 52 display: flex;
63 53 gap: 22px;
64 54 align-items: center;
@@ -66,8 +56,19 @@
66 56
67 57 a {
68 58 color: inherit;
69 59 text-decoration: none;
60 +
61 + &:hover,
62 + &:focus {
63 + color: var(--cs-color-accent);
64 + box-shadow: none;
65 + }
66 +
67 + &:focus-visible {
68 + outline: 2px solid var(--cs-color-accent);
69 + outline-offset: 6px;
70 + }
70 71 }
71 72
72 73 @media (width <= 480px) {
73 74 padding-inline: 10px;
@@ -86,9 +87,9 @@
86 87 }
87 88 }
88 89
89 90 .code-snippets-toolbar-lower {
90 - border-block-end: 1px solid #e2e2e4;
91 + border-block-end: 1px solid var(--cs-color-border-subtle);
91 92 block-size: 60px;
92 93 box-sizing: border-box;
93 94
94 95 nav,
@@ -102,12 +103,18 @@
102 103 }
103 104
104 105 li {
105 106 display: flex;
107 +
108 + &:last-of-type {
109 + margin-inline-start: auto;
110 + }
106 111 }
107 112
108 113 // Items fill the 60px band; the active tab is indicated by accent colour on
109 - // its icon and label, with no underline.
114 + // its icon and label plus a 3px accent underline, reserved on every item as a
115 + // transparent border so activating a tab never shifts the row.
116 + // stylelint-disable-next-line no-descending-specificity
110 117 li a {
111 118 display: flex;
112 119 margin: 0;
113 120 block-size: 100%;
@@ -112,9 +119,9 @@
112 119 margin: 0;
113 120 block-size: 100%;
114 121 padding-block: 0;
115 122 padding-inline: 24px;
116 - color: #2c3337;
123 + color: var(--cs-color-text);
117 124 gap: 12px;
118 125 align-items: center;
119 126 font-size: 16px;
120 127 font-weight: 600;
@@ -129,16 +136,18 @@
129 136 block-size: 26px;
130 137 }
131 138
132 139 &.active-link, &:hover, &:focus, &:active {
133 - color: theme.$accent;
140 + color: var(--cs-color-accent);
134 141 z-index: 1;
135 - border-color: theme.$accent;
142 + border-color: var(--cs-color-accent);
143 + box-shadow: none;
136 144 }
137 - }
138 145
139 - li:not(.toolbar-end-item) + li.toolbar-end-item {
140 - margin-inline-start: auto;
146 + &:focus-visible {
147 + outline: 2px solid var(--cs-color-accent);
148 + outline-offset: -2px;
149 + }
141 150 }
142 151
143 152 // Narrow widths: centre each item's label directly beneath its icon and
144 153 // shrink the type so the nav still fits on one row. The pro chip becomes a
@@ -155,9 +164,11 @@
155 164 padding-inline: 14px;
156 165 font-size: 13px;
157 166 text-align: center;
158 167
159 - .pro-chip {
168 + .pro-chip,
169 + .new-chip,
170 + .demo-chip {
160 171 position: absolute;
161 172 inset-block-start: 7px;
162 173 inset-inline-end: 4px;
163 174 padding-block: 1px;
@@ -167,25 +178,9 @@
167 178 }
168 179 }
169 180 }
170 181
171 - // On narrow screens Settings remains available through the WordPress submenu.
172 - // The remaining primary destinations fill the toolbar evenly rather than
173 - // becoming a second horizontally-scrolling navigation row.
174 182 @media (width <= 782px) {
175 - li.toolbar-end-item {
176 - display: none;
177 - }
178 -
179 - li:not(.toolbar-end-item) {
180 - flex: 1 1 0;
181 - min-inline-size: 0;
182 - }
183 -
184 - li:not(.toolbar-end-item) + li.toolbar-end-item {
185 - margin-inline-start: 0;
186 - }
187 -
188 183 li a {
189 184 inline-size: 100%;
190 185 padding-inline: 8px;
191 186 white-space: normal;
@@ -196,16 +191,17 @@
196 191 .code-snippets-toolbar-upper li a.active-link,
197 192 .code-snippets-toolbar-upper li a:hover,
198 193 .code-snippets-toolbar-upper li a:focus,
199 194 .code-snippets-toolbar-upper li a:active {
200 - color: theme.$accent;
195 + color: var(--cs-color-accent);
201 196 }
202 197
203 198 .code-snippets-toolbar-lower .pro-chip,
199 +.code-snippets-toolbar-lower .demo-chip,
204 200 .nav-tab .pro-chip,
205 201 .snippet-type-link .pro-chip {
206 - color: theme.$accent;
207 - background: #eff5f9;
202 + color: var(--cs-color-accent);
203 + background: var(--cs-color-surface-info);
208 204 border: 1px solid rgb(34 113 177 / 10%);
209 205 text-transform: uppercase;
210 206 border-radius: 999px;
211 207 display: flex;
@@ -217,12 +213,32 @@
217 213 line-height: 1;
218 214 }
219 215
220 216
221 -.code-snippets-toolbar-lower .pro-chip {
217 +.code-snippets-toolbar-lower .pro-chip,
218 +.code-snippets-toolbar-lower .demo-chip {
222 219 font-size: 12px;
223 220 }
224 221
222 +// Deliberately warm, so it reads as "new here" rather than as another locked
223 +// Pro destination alongside the blue pro chips.
224 +.code-snippets-toolbar-lower .new-chip {
225 + color: #fff;
226 + background: linear-gradient(135deg, var(--cs-color-secondary) 0%, #e2953f 100%);
227 + border: 1px solid rgb(0 0 0 / 5%);
228 + text-transform: uppercase;
229 + border-radius: 999px;
230 + display: flex;
231 + justify-content: center;
232 + align-items: center;
233 + box-sizing: border-box;
234 + padding: 5px 10px;
235 + font-size: 12px;
236 + font-weight: 700;
237 + letter-spacing: 0.04em;
238 + line-height: 1;
239 +}
240 +
225 241 .nav-tab .pro-chip,
226 242 .snippet-type-link .pro-chip {
227 243 font-size: 10px;
228 244 }
@@ -227,9 +243,27 @@
227 243 font-size: 10px;
228 244 }
229 245
230 246 .code-snippets-return-link {
231 - float: inline-end;
247 + display: inline-flex;
248 + float: none;
249 + align-items: center;
250 + min-block-size: 36px;
251 + margin-block: 32px 20px;
252 + padding-inline: 12px;
253 + border-color: var(--cs-color-accent);
254 + background: transparent;
255 + color: var(--cs-color-accent);
256 + font-size: 14px;
257 + font-weight: 500;
258 + text-decoration: none;
259 +
260 + &:hover,
261 + &:focus-visible {
262 + border-color: var(--cs-color-accent-hover);
263 + background: transparent;
264 + color: var(--cs-color-accent-hover);
265 + }
232 266 }
233 267
234 268 .code-snippets-toolbar-upper .toolbar-more-item {
235 269 display: none;
@@ -261,10 +295,10 @@
261 295 min-inline-size: 180px;
262 296 block-size: auto;
263 297 margin: 0;
264 298 padding: 8px;
265 - background: #fff;
266 - border: 1px solid theme.$control-border;
299 + background: var(--cs-color-surface);
300 + border: 1px solid var(--cs-color-border);
267 301 box-shadow: 0 3px 8px rgb(0 0 0 / 15%);
268 302 }
269 303
270 304 .code-snippets-toolbar-upper .toolbar-more-menu li {
@@ -281,9 +315,9 @@
281 315 }
282 316
283 317 .code-snippets-toolbar-upper .toolbar-more-menu a:hover,
284 318 .code-snippets-toolbar-upper .toolbar-more-menu a:focus {
285 - background: #f6f7f7;
319 + background: var(--cs-color-surface-subtle);
286 320 }
287 321
288 322 @media (width <= 960px) {
289 323 .code-snippets-toolbar-upper {
@@ -290,8 +324,12 @@
290 324 gap: 12px;
291 325 padding-inline: 16px;
292 326 }
293 327
328 + .code-snippets-toolbar-upper ul {
329 + gap: 0;
330 + }
331 +
294 332 .code-snippets-toolbar-upper .logo {
295 333 flex: 0 1 auto;
296 334 min-inline-size: 0;
297 335 }
@@ -328,6 +366,73 @@
328 366
329 367 @media (width <= 640px) {
330 368 .code-snippets-toolbar-upper .logo div {
331 369 display: none;
370 + }
371 +}
372 +
373 +.wp-core-ui .code-snippets-toolbar-upper .button.cloud-connected-button {
374 + display: flex;
375 + align-items: center;
376 + justify-content: center;
377 + text-align: center;
378 + gap: 8px;
379 + text-transform: uppercase;
380 + background: #f6f7f7;
381 + color: #646970;
382 + font-size: 12px;
383 + font-weight: bold;
384 + border: none;
385 + min-block-size: 3.5em;
386 + min-inline-size: 12.5em;
387 +}
388 +
389 +.cloud-disconnect-confirmation-modal .components-modal__children-container {
390 + display: flex;
391 + flex-flow: column;
392 + align-items: center;
393 + font-size: 16px;
394 + gap: 1em;
395 + min-inline-size: 512px;
396 +
397 + h1 {
398 + font-size: 28px;
399 + margin-block: 0;
400 + }
401 +
402 + p {
403 + color: #646970;
404 + font-size: inherit;
405 + max-inline-size: 22em;
406 + text-align: center;
407 + }
408 +
409 + a.button {
410 + font-size: inherit;
411 + background-color: var(--cs-color-secondary);
412 + }
413 +
414 + .button-link {
415 + color: var(--cs-color-secondary);
416 + border: none;
417 + }
418 +}
419 +
420 +// Slot that adopts the WordPress Screen Options / Help tabs so they appear
421 +// directly below the toolbar instead of above the page content.
422 +.snippets-screen-meta-slot {
423 + #screen-meta-links {
424 + float: none;
425 + display: flex;
426 + justify-content: flex-end;
427 + margin: 0;
428 + border-color: var(--cs-color-border-subtle);
429 +
430 + .show-settings {
431 + border-color: var(--cs-color-border-subtle);
432 + }
433 + }
434 +
435 + #screen-meta {
436 + margin: 0;
332 437 }
333 438 }