@wordpress/base-styles 5.8.1 → 5.9.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,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 5.9.0 (2024-10-03)
6
+
5
7
  ## 5.8.0 (2024-09-19)
6
8
 
7
9
  ## 5.7.0 (2024-09-05)
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
 
@@ -70,10 +69,6 @@ $z-layers: (
70
69
  // Below the media library backdrop (.media-modal-backdrop), which has a z-index of 159900.
71
70
  ".block-editor-global-styles-background-panel__popover": 159900 - 10,
72
71
 
73
- // Small screen inner blocks overlay must be displayed above drop zone,
74
- // settings menu, and movers.
75
- ".block-editor-block-list__layout.has-overlay::after": 60,
76
-
77
72
  // The toolbar, when contextual, should be above any adjacent nested block click overlays.
78
73
  ".block-editor-block-contextual-toolbar": 61,
79
74
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/base-styles",
3
- "version": "5.8.1",
3
+ "version": "5.9.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": "cf707c1f25a2716e310cc8f9afcc8554405c79ac"
30
+ "gitHead": "2e5495c635910cb34bfaca3c6258d2e989f66214"
31
31
  }