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 +155 -48 3.10.0-beta.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;
@@ -121,8 +128,9 @@
121 128 letter-spacing: -0.16px;
122 129 text-decoration: none;
123 130 box-sizing: border-box;
124 131 cursor: pointer;
132 + border-block-end: 3px solid transparent;
125 133
126 134 svg {
127 135 inline-size: 26px;
128 136 block-size: 26px;
@@ -128,15 +136,18 @@
128 136 block-size: 26px;
129 137 }
130 138
131 139 &.active-link, &:hover, &:focus, &:active {
132 - color: theme.$accent;
140 + color: var(--cs-color-accent);
133 141 z-index: 1;
142 + border-color: var(--cs-color-accent);
143 + box-shadow: none;
134 144 }
135 - }
136 145
137 - li:not(.toolbar-end-item) + li.toolbar-end-item {
138 - margin-inline-start: auto;
146 + &:focus-visible {
147 + outline: 2px solid var(--cs-color-accent);
148 + outline-offset: -2px;
149 + }
139 150 }
140 151
141 152 // Narrow widths: centre each item's label directly beneath its icon and
142 153 // shrink the type so the nav still fits on one row. The pro chip becomes a
@@ -153,9 +164,11 @@
153 164 padding-inline: 14px;
154 165 font-size: 13px;
155 166 text-align: center;
156 167
157 - .pro-chip {
168 + .pro-chip,
169 + .new-chip,
170 + .demo-chip {
158 171 position: absolute;
159 172 inset-block-start: 7px;
160 173 inset-inline-end: 4px;
161 174 padding-block: 1px;
@@ -165,25 +178,9 @@
165 178 }
166 179 }
167 180 }
168 181
169 - // On narrow screens Settings remains available through the WordPress submenu.
170 - // The remaining primary destinations fill the toolbar evenly rather than
171 - // becoming a second horizontally-scrolling navigation row.
172 182 @media (width <= 782px) {
173 - li.toolbar-end-item {
174 - display: none;
175 - }
176 -
177 - li:not(.toolbar-end-item) {
178 - flex: 1 1 0;
179 - min-inline-size: 0;
180 - }
181 -
182 - li:not(.toolbar-end-item) + li.toolbar-end-item {
183 - margin-inline-start: 0;
184 - }
185 -
186 183 li a {
187 184 inline-size: 100%;
188 185 padding-inline: 8px;
189 186 white-space: normal;
@@ -194,16 +191,17 @@
194 191 .code-snippets-toolbar-upper li a.active-link,
195 192 .code-snippets-toolbar-upper li a:hover,
196 193 .code-snippets-toolbar-upper li a:focus,
197 194 .code-snippets-toolbar-upper li a:active {
198 - color: theme.$accent;
195 + color: var(--cs-color-accent);
199 196 }
200 197
201 198 .code-snippets-toolbar-lower .pro-chip,
199 +.code-snippets-toolbar-lower .demo-chip,
202 200 .nav-tab .pro-chip,
203 201 .snippet-type-link .pro-chip {
204 - color: theme.$accent;
205 - background: #eff5f9;
202 + color: var(--cs-color-accent);
203 + background: var(--cs-color-surface-info);
206 204 border: 1px solid rgb(34 113 177 / 10%);
207 205 text-transform: uppercase;
208 206 border-radius: 999px;
209 207 display: flex;
@@ -215,12 +213,32 @@
215 213 line-height: 1;
216 214 }
217 215
218 216
219 -.code-snippets-toolbar-lower .pro-chip {
217 +.code-snippets-toolbar-lower .pro-chip,
218 +.code-snippets-toolbar-lower .demo-chip {
220 219 font-size: 12px;
221 220 }
222 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 +
223 241 .nav-tab .pro-chip,
224 242 .snippet-type-link .pro-chip {
225 243 font-size: 10px;
226 244 }
@@ -225,9 +243,27 @@
225 243 font-size: 10px;
226 244 }
227 245
228 246 .code-snippets-return-link {
229 - 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 + }
230 266 }
231 267
232 268 .code-snippets-toolbar-upper .toolbar-more-item {
233 269 display: none;
@@ -259,10 +295,10 @@
259 295 min-inline-size: 180px;
260 296 block-size: auto;
261 297 margin: 0;
262 298 padding: 8px;
263 - background: #fff;
264 - border: 1px solid theme.$control-border;
299 + background: var(--cs-color-surface);
300 + border: 1px solid var(--cs-color-border);
265 301 box-shadow: 0 3px 8px rgb(0 0 0 / 15%);
266 302 }
267 303
268 304 .code-snippets-toolbar-upper .toolbar-more-menu li {
@@ -279,9 +315,9 @@
279 315 }
280 316
281 317 .code-snippets-toolbar-upper .toolbar-more-menu a:hover,
282 318 .code-snippets-toolbar-upper .toolbar-more-menu a:focus {
283 - background: #f6f7f7;
319 + background: var(--cs-color-surface-subtle);
284 320 }
285 321
286 322 @media (width <= 960px) {
287 323 .code-snippets-toolbar-upper {
@@ -288,8 +324,12 @@
288 324 gap: 12px;
289 325 padding-inline: 16px;
290 326 }
291 327
328 + .code-snippets-toolbar-upper ul {
329 + gap: 0;
330 + }
331 +
292 332 .code-snippets-toolbar-upper .logo {
293 333 flex: 0 1 auto;
294 334 min-inline-size: 0;
295 335 }
@@ -326,6 +366,73 @@
326 366
327 367 @media (width <= 640px) {
328 368 .code-snippets-toolbar-upper .logo div {
329 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;
330 437 }
331 438 }