@wordpress/base-styles 5.3.0 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 5.5.0 (2024-08-07)
6
+
7
+ ## 5.4.0 (2024-07-24)
8
+
5
9
  ## 5.3.0 (2024-07-10)
6
10
 
7
11
  ## 5.2.0 (2024-06-26)
package/_animations.scss CHANGED
@@ -3,3 +3,8 @@
3
3
  animation-fill-mode: forwards;
4
4
  @include reduce-motion("animation");
5
5
  }
6
+
7
+ @mixin editor-canvas-resize-animation() {
8
+ transition: all 0.5s cubic-bezier(0.65, 0, 0.45, 1);
9
+ @include reduce-motion("transition");
10
+ }
package/_mixins.scss CHANGED
@@ -162,22 +162,6 @@
162
162
  }
163
163
  }
164
164
 
165
- @mixin placeholder-style() {
166
- border-radius: $radius-block-ui;
167
-
168
- &::before {
169
- content: "";
170
- position: absolute;
171
- top: 0;
172
- right: 0;
173
- bottom: 0;
174
- left: 0;
175
- pointer-events: none;
176
- background: currentColor;
177
- opacity: 0.1;
178
- }
179
- }
180
-
181
165
  /**
182
166
  * Allows users to opt-out of animations via OS-level preferences.
183
167
  */
@@ -318,6 +302,7 @@
318
302
  height: $radio-input-size-sm;
319
303
  min-width: $radio-input-size-sm;
320
304
  max-width: $radio-input-size-sm;
305
+ position: relative;
321
306
 
322
307
  @include break-small() {
323
308
  height: $radio-input-size;
@@ -328,9 +313,12 @@
328
313
 
329
314
  &:checked::before {
330
315
  box-sizing: inherit;
331
- width: 8px;
332
- height: 8px;
333
- transform: translate(7px, 7px);
316
+ width: math.div($radio-input-size-sm, 2);
317
+ height: math.div($radio-input-size-sm, 2);
318
+ position: absolute;
319
+ top: 50%;
320
+ left: 50%;
321
+ transform: translate(-50%, -50%);
334
322
  margin: 0;
335
323
  background-color: $white;
336
324
 
@@ -338,7 +326,8 @@
338
326
  border: 4px solid $white;
339
327
 
340
328
  @include break-small() {
341
- transform: translate(5px, 5px);
329
+ width: math.div($radio-input-size, 2);
330
+ height: math.div($radio-input-size, 2);
342
331
  }
343
332
  }
344
333
 
@@ -351,7 +340,7 @@
351
340
 
352
341
  &:checked {
353
342
  background: var(--wp-admin-theme-color);
354
- border-color: var(--wp-admin-theme-color);
343
+ border: none;
355
344
  }
356
345
  }
357
346
 
@@ -597,3 +586,21 @@
597
586
  }
598
587
  }
599
588
  }
589
+
590
+ @mixin selected-block-outline($widthRatio: 1) {
591
+ outline-color: var(--wp-admin-theme-color);
592
+ outline-style: solid;
593
+ outline-width: calc(#{$widthRatio} * (var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1)));
594
+ outline-offset: calc(#{$widthRatio} * ((-1 * var(--wp-admin-border-width-focus) ) / var(--wp-block-editor-iframe-zoom-out-scale, 1)));
595
+ }
596
+
597
+ @mixin selected-block-focus($widthRatio: 1) {
598
+ content: "";
599
+ position: absolute;
600
+ pointer-events: none;
601
+ top: 0;
602
+ right: 0;
603
+ bottom: 0;
604
+ left: 0;
605
+ @include selected-block-outline($widthRatio);
606
+ }
package/_variables.scss CHANGED
@@ -22,7 +22,6 @@ $text-editor-font-size: 15px;
22
22
  $editor-line-height: 1.8;
23
23
  $mobile-text-min-font-size: 16px; // Any font size below 16px will cause Mobile Safari to "zoom in".
24
24
 
25
-
26
25
  /**
27
26
  * Grid System.
28
27
  * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
@@ -40,6 +39,17 @@ $grid-unit-60: 6 * $grid-unit; // 48px
40
39
  $grid-unit-70: 7 * $grid-unit; // 56px
41
40
  $grid-unit-80: 8 * $grid-unit; // 64px
42
41
 
42
+ /**
43
+ * Radius scale.
44
+ */
45
+
46
+ $radius-x-small: 1px; // Applied to elements like buttons nested within primitives like inputs.
47
+ $radius-small: 2px; // Applied to most primitives.
48
+ $radius-medium: 4px; // Applied to containers with smaller padding.
49
+ $radius-large: 8px; // Applied to containers with larger padding.
50
+ $radius-full: 9999px; // For lozenges.
51
+ $radius-round: 50%; // For circles and ovals.
52
+
43
53
  /**
44
54
  * Dimensions.
45
55
  */
@@ -51,7 +61,7 @@ $button-size-small: 24px;
51
61
  $button-size-compact: 32px;
52
62
  $header-height: 60px;
53
63
  $panel-header-height: $grid-unit-60;
54
- $nav-sidebar-width: 360px;
64
+ $nav-sidebar-width: 300px;
55
65
  $admin-bar-height: 32px;
56
66
  $admin-bar-height-big: 46px;
57
67
  $admin-sidebar-width: 160px;
@@ -80,7 +90,7 @@ $sidebar-width: 280px;
80
90
  $content-width: 840px;
81
91
  $wide-content-width: 1100px;
82
92
  $widget-area-width: 700px;
83
-
93
+ $secondary-sidebar-width: 350px;
84
94
 
85
95
  /**
86
96
  * Block & Editor UI.
@@ -91,13 +101,12 @@ $border-width: 1px;
91
101
  $border-width-focus-fallback: 2px; // This exists as a fallback, and is ideally overridden by var(--wp-admin-border-width-focus) unless in some SASS math cases.
92
102
  $border-width-tab: 1.5px;
93
103
  $helptext-font-size: 12px;
94
- $radius-round: 50%;
95
- $radius-block-ui: 2px;
96
- $radio-input-size: 20px;
104
+ $radio-input-size: 16px;
97
105
  $radio-input-size-sm: 24px; // Width & height for small viewports.
98
106
 
99
107
  // Deprecated, please avoid using these.
100
108
  $block-padding: 14px; // Used to define space between block footprint and surrouding borders.
109
+ $radius-block-ui: $radius-small;
101
110
 
102
111
 
103
112
  /**
package/_z-index.scss CHANGED
@@ -131,6 +131,7 @@ $z-layers: (
131
131
  ".block-editor-template-part__selection-modal": 1000001,
132
132
  ".block-editor-block-rename-modal": 1000001,
133
133
  ".edit-site-list__rename-modal": 1000001,
134
+ ".dataviews-bulk-actions__modal": 1000001,
134
135
  ".dataviews-action-modal": 1000001,
135
136
  ".editor-action-modal": 1000001,
136
137
  ".editor-post-template__swap-template-modal": 1000001,
@@ -207,8 +208,11 @@ $z-layers: (
207
208
  // Ensure checkbox + actions don't overlap table header
208
209
  ".dataviews-view-table thead": 1,
209
210
 
211
+ // Ensure selection checkbox stays above the preview field.
212
+ ".dataviews-view-grid__card .dataviews-selection-checkbox": 1,
213
+
210
214
  // Ensure quick actions toolbar appear above pagination
211
- ".dataviews-bulk-actions": 2,
215
+ ".dataviews-bulk-actions-toolbar": 2,
212
216
  );
213
217
 
214
218
  @function z-index( $key ) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/base-styles",
3
- "version": "5.3.0",
3
+ "version": "5.5.0",
4
4
  "description": "Base SCSS utilities and variables for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,5 +27,5 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "122867d355ca4edc63d3a3bbd9411d3a2e1458df"
30
+ "gitHead": "c3101ab024e2bfc85d525c6d247e0d57cafc9fd9"
31
31
  }