@wordpress/base-styles 5.8.2 → 5.10.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.10.0 (2024-10-16)
6
+
7
+ ## 5.9.0 (2024-10-03)
8
+
5
9
  ## 5.8.0 (2024-09-19)
6
10
 
7
11
  ## 5.7.0 (2024-09-05)
package/_animations.scss CHANGED
@@ -36,11 +36,6 @@
36
36
  @include reduce-motion("animation");
37
37
  }
38
38
 
39
- @mixin editor-canvas-resize-animation() {
40
- transition: all 0.4s cubic-bezier(0.46, 0.03, 0.52, 0.96);
41
- @include reduce-motion("transition");
42
- }
43
-
44
39
  // Deprecated
45
40
  @mixin edit-post__fade-in-animation($speed: 0.08s, $delay: 0s) {
46
41
  @warn "The `edit-post__fade-in-animation` mixin is deprecated. Use `animation__fade-in` instead.";
package/_colors.scss CHANGED
@@ -8,7 +8,7 @@
8
8
  $black: #000; // Use only when you truly need pure black. For UI, use $gray-900.
9
9
  $gray-900: #1e1e1e;
10
10
  $gray-800: #2f2f2f;
11
- $gray-700: #757575; // Meets 4.6:1 text contrast against white.
11
+ $gray-700: #757575; // Meets 4.6:1 (4.5:1 is minimum) text contrast against white.
12
12
  $gray-600: #949494; // Meets 3:1 UI or large text contrast against white.
13
13
  $gray-400: #ccc;
14
14
  $gray-300: #ddd; // Used for most borders.
package/_mixins.scss CHANGED
@@ -1,6 +1,74 @@
1
1
  @import "./functions";
2
2
  @import "./long-content-fade";
3
3
 
4
+ /**
5
+ * Typography
6
+ */
7
+
8
+ @mixin _text-heading() {
9
+ font-family: $font-family-headings;
10
+ font-weight: $font-weight-medium;
11
+ }
12
+
13
+ @mixin _text-body() {
14
+ font-family: $font-family-body;
15
+ font-weight: $font-weight-regular;
16
+ }
17
+
18
+ @mixin heading-small() {
19
+ @include _text-heading();
20
+ font-size: $font-size-x-small;
21
+ line-height: $line-height-x-small;
22
+ }
23
+
24
+ @mixin heading-medium() {
25
+ @include _text-heading();
26
+ font-size: $font-size-medium;
27
+ line-height: $line-height-small;
28
+ }
29
+
30
+ @mixin heading-large() {
31
+ @include _text-heading();
32
+ font-size: $font-size-large;
33
+ line-height: $line-height-small;
34
+ }
35
+
36
+ @mixin heading-x-large() {
37
+ @include _text-heading();
38
+ font-size: $font-size-x-large;
39
+ line-height: $line-height-medium;
40
+ }
41
+
42
+ @mixin heading-2x-large() {
43
+ @include _text-heading();
44
+ font-size: $font-size-2x-large;
45
+ line-height: $font-line-height-2x-large;
46
+ }
47
+
48
+ @mixin body-small() {
49
+ @include _text-body();
50
+ font-size: $font-size-small;
51
+ line-height: $line-height-x-small;
52
+ }
53
+
54
+ @mixin body-medium() {
55
+ @include _text-body();
56
+ font-size: $font-size-medium;
57
+ line-height: $line-height-small;
58
+ }
59
+
60
+ @mixin body-large() {
61
+ @include _text-body();
62
+ font-size: $font-size-large;
63
+ line-height: $line-height-medium;
64
+ }
65
+
66
+ @mixin body-x-large() {
67
+ @include _text-body();
68
+ font-size: $font-size-x-large;
69
+ line-height: $line-height-x-large;
70
+ }
71
+
4
72
  /**
5
73
  * Breakpoint mixins
6
74
  */
package/_variables.scss CHANGED
@@ -12,15 +12,37 @@
12
12
  * Fonts & basic variables.
13
13
  */
14
14
 
15
- $default-font: -apple-system, BlinkMacSystemFont,"Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell,"Helvetica Neue", sans-serif;
16
- $default-font-size: 13px;
17
- $default-line-height: 1.4;
18
- $editor-html-font: Menlo, Consolas, monaco, monospace;
19
- $editor-font-size: 16px;
20
- $default-block-margin: 28px; // This value provides a consistent, contiguous spacing between blocks.
21
- $text-editor-font-size: 15px;
22
- $editor-line-height: 1.8;
23
- $mobile-text-min-font-size: 16px; // Any font size below 16px will cause Mobile Safari to "zoom in".
15
+ $default-font: -apple-system, BlinkMacSystemFont,"Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell,"Helvetica Neue", sans-serif; // Todo: deprecate in favor of $family variables
16
+ $default-line-height: 1.4; // Todo: deprecate in favor of $line-height tokens
17
+
18
+ /**
19
+ * Typography
20
+ */
21
+
22
+ // Sizes
23
+ $font-size-x-small: 11px;
24
+ $font-size-small: 12px;
25
+ $font-size-medium: 13px;
26
+ $font-size-large: 15px;
27
+ $font-size-x-large: 20px;
28
+ $font-size-2x-large: 32px;
29
+
30
+ // Line heights
31
+ $font-line-height-x-small: 16px;
32
+ $font-line-height-small: 20px;
33
+ $font-line-height-medium: 24px;
34
+ $font-line-height-large: 28px;
35
+ $font-line-height-x-large: 32px;
36
+ $font-line-height-2x-large: 40px;
37
+
38
+ // Weights
39
+ $font-weight-regular: 400;
40
+ $font-weight-medium: 500;
41
+
42
+ // Families
43
+ $font-family-headings: -apple-system, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
44
+ $font-family-body: -apple-system, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
45
+ $font-family-mono: Menlo, Consolas, monaco, monospace;
24
46
 
25
47
  /**
26
48
  * Grid System.
@@ -91,7 +113,12 @@ $spinner-size: 16px;
91
113
  $canvas-padding: $grid-unit-20;
92
114
 
93
115
  /**
94
- * Editor widths.
116
+ * Mobile specific styles
117
+ */
118
+ $mobile-text-min-font-size: 16px; // Any font size below 16px will cause Mobile Safari to "zoom in".
119
+
120
+ /**
121
+ * Editor styles.
95
122
  */
96
123
 
97
124
  $sidebar-width: 280px;
@@ -99,6 +126,11 @@ $content-width: 840px;
99
126
  $wide-content-width: 1100px;
100
127
  $widget-area-width: 700px;
101
128
  $secondary-sidebar-width: 350px;
129
+ $editor-font-size: 16px;
130
+ $default-block-margin: 28px; // This value provides a consistent, contiguous spacing between blocks.
131
+ $text-editor-font-size: 15px;
132
+ $editor-line-height: 1.8;
133
+ $editor-html-font: $font-family-mono;
102
134
 
103
135
  /**
104
136
  * Block & Editor UI.
@@ -117,7 +149,7 @@ $block-padding: 14px; // Used to define space between block footprint and surrou
117
149
  $radius-block-ui: $radius-small;
118
150
  $shadow-popover: $elevation-x-small;
119
151
  $shadow-modal: $elevation-large;
120
-
152
+ $default-font-size: $font-size-medium;
121
153
 
122
154
  /**
123
155
  * Block paddings.
package/_z-index.scss CHANGED
@@ -8,7 +8,6 @@ $z-layers: (
8
8
  ".block-editor-block-switcher__arrow": 1,
9
9
  ".block-editor-block-list__block {core/image aligned wide or fullwide}": 20,
10
10
  ".block-library-classic__toolbar": 31, // When scrolled to top this toolbar needs to sit over block-editor-block-toolbar
11
- ".block-editor-block-list__block-selection-button": 22,
12
11
  ".components-form-toggle__input": 1,
13
12
  ".editor-text-editor__toolbar": 1,
14
13
 
@@ -32,10 +31,12 @@ $z-layers: (
32
31
  ".interface-interface-skeleton__header": 30,
33
32
  ".interface-interface-skeleton__content": 20,
34
33
  ".edit-widgets-header": 30,
34
+ ".wp-block-cover__inner-container": 1, // InnerBlocks area inside cover image block.
35
35
  ".wp-block-cover.is-placeholder .components-placeholder.is-large": 1, // Cover block resizer component inside a large placeholder.
36
- ".wp-block-cover.has-background-dim::before": 0, // Overlay area inside block cover need to be higher than the video background.
37
- ".wp-block-cover__image-background": -1, // Image background inside cover block.
38
- ".wp-block-cover__video-background": -1, // Video background inside cover block.
36
+ ".wp-block-cover.has-background-dim::before": 1, // Overlay area inside block cover need to be higher than the video background.
37
+ ".block-library-cover__padding-visualizer": 2, // BoxControl visualizer needs to be +1 higher than .wp-block-cover.has-background-dim::before
38
+ ".wp-block-cover__image-background": 0, // Image background inside cover block.
39
+ ".wp-block-cover__video-background": 0, // Video background inside cover block.
39
40
  ".wp-block-template-part__placeholder-preview-filter-input": 1,
40
41
 
41
42
  // Fixed position appender:
@@ -68,10 +69,6 @@ $z-layers: (
68
69
  // Below the media library backdrop (.media-modal-backdrop), which has a z-index of 159900.
69
70
  ".block-editor-global-styles-background-panel__popover": 159900 - 10,
70
71
 
71
- // Small screen inner blocks overlay must be displayed above drop zone,
72
- // settings menu, and movers.
73
- ".block-editor-block-list__layout.has-overlay::after": 60,
74
-
75
72
  // The toolbar, when contextual, should be above any adjacent nested block click overlays.
76
73
  ".block-editor-block-contextual-toolbar": 61,
77
74
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/base-styles",
3
- "version": "5.8.2",
3
+ "version": "5.10.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": "b7af02f8431034ee19cdc33dd105d21705823eed"
30
+ "gitHead": "ab34a7ac935fd1478eac63b596242d83270897ee"
31
31
  }