Skip to content

Commit ac1d413

Browse files
authored
Merge pull request #21 from peiche/v1.0.4
v1.0.4
2 parents b614aa4 + 4e4600d commit ac1d413

File tree

9 files changed

+75
-86
lines changed

9 files changed

+75
-86
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Change Log
22

3+
## 1.0.4
4+
5+
- Fixed responsive font sizes to improve readability.
6+
- Removed unneeded attributes from custom block style registration.
7+
- Removed old quote block large style selector.
8+
- Removed unneeded quote block plain style from stylesheet.
9+
- Vulnerability patch.
10+
- Updated caniuse.
11+
312
## 1.0.3
413

514
- Added top margin to quote block.

inc/block-styles.php

Lines changed: 22 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -13,121 +13,88 @@ function ankur_register_block_styles() {
1313
register_block_style(
1414
'core/button',
1515
array(
16-
'name' => 'underline',
17-
'label' => __( 'Underline', 'ankur' ),
18-
'attributes' => array(
19-
'className' => 'is-style-underline',
20-
),
16+
'name' => 'underline',
17+
'label' => __( 'Underline', 'ankur' ),
2118
)
2219
);
2320

2421
register_block_style(
2522
'core/query-pagination',
2623
array(
27-
'name' => 'buttons',
28-
'label' => __( 'Buttons', 'ankur' ),
29-
'attributes' => array(
30-
'className' => 'is-style-buttons',
31-
),
24+
'name' => 'buttons',
25+
'label' => __( 'Buttons', 'ankur' ),
3226
)
3327
);
3428

3529
register_block_style(
3630
'core/post-terms',
3731
array(
38-
'name' => 'buttons',
39-
'label' => __( 'Buttons', 'ankur' ),
40-
'attributes' => array(
41-
'className' => 'is-style-buttons',
42-
),
32+
'name' => 'buttons',
33+
'label' => __( 'Buttons', 'ankur' ),
4334
)
4435
);
4536

4637
register_block_style(
4738
'core/post-terms',
4839
array(
49-
'name' => 'outline',
50-
'label' => __( 'Outline', 'ankur' ),
51-
'attributes' => array(
52-
'className' => 'is-style-outline',
53-
),
40+
'name' => 'outline',
41+
'label' => __( 'Outline', 'ankur' ),
5442
)
5543
);
5644

5745
register_block_style(
5846
'core/quote',
5947
array(
60-
'name' => 'large',
61-
'label' => __( 'Large', 'ankur' ),
62-
'attributes' => array(
63-
'className' => 'is-style-large',
64-
),
48+
'name' => 'large',
49+
'label' => __( 'Large', 'ankur' ),
6550
)
6651
);
6752

6853
register_block_style(
6954
'core/image',
7055
array(
71-
'name' => 'pill',
72-
'label' => __( 'Pill', 'ankur' ),
73-
'attributes' => array(
74-
'className' => 'is-style-pill',
75-
),
56+
'name' => 'pill',
57+
'label' => __( 'Pill', 'ankur' ),
7658
)
7759
);
7860

7961
register_block_style(
8062
'core/embed',
8163
array(
82-
'name' => 'rounded',
83-
'label' => __( 'Rounded', 'ankur' ),
84-
'attributes' => array(
85-
'className' => 'is-style-rounded',
86-
),
64+
'name' => 'rounded',
65+
'label' => __( 'Rounded', 'ankur' ),
8766
)
8867
);
8968

9069
register_block_style(
9170
'core/gallery',
9271
array(
93-
'name' => 'diamond',
94-
'label' => __( 'Diamond', 'ankur' ),
95-
'attributes' => array(
96-
'className' => 'is-style-diamond',
97-
),
72+
'name' => 'diamond',
73+
'label' => __( 'Diamond', 'ankur' ),
9874
)
9975
);
10076

10177
register_block_style(
10278
'core/media-text',
10379
array(
104-
'name' => 'overlap',
105-
'label' => __( 'Text Overlap', 'ankur' ),
106-
'attributes' => array(
107-
'className' => 'is-style-overlap',
108-
),
80+
'name' => 'overlap',
81+
'label' => __( 'Text Overlap', 'ankur' ),
10982
)
11083
);
11184

11285
register_block_style(
11386
'core/cover',
11487
array(
115-
'name' => 'rounded',
116-
'label' => __( 'Rounded', 'ankur' ),
117-
'attributes' => array(
118-
'className' => 'is-style-rounded',
119-
),
88+
'name' => 'rounded',
89+
'label' => __( 'Rounded', 'ankur' ),
12090
)
12191
);
12292

12393
register_block_style(
12494
'core/video',
12595
array(
126-
'name' => 'rounded',
127-
'label' => __( 'Rounded', 'ankur' ),
128-
'attributes' => array(
129-
'className' => 'is-style-rounded',
130-
),
96+
'name' => 'rounded',
97+
'label' => __( 'Rounded', 'ankur' ),
13198
)
13299
);
133100
}

package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ankur",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "WordPress block theme supporting full site editing",
55
"scripts": {
66
"lint:css": "wp-scripts lint-style \"src/**/*.scss\"",

prettierrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ export default {
55
"stylelint-config-prettier"
66
],
77
...wordpressPrettierConfig,
8+
"endOfLine": "auto",
89
};

src/scss/blocks/quote/_base.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.wp-block-quote {
22
margin-block-start: var(--wp--preset--spacing--component-padding);
33

4-
&.wp-block-quote.is-large,
54
&.wp-block-quote.is-style-large {
65
padding-left: 0;
76
padding-right: 0;

src/scss/blocks/quote/_editor.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
11
@use "./base" as *;
2-
3-
.wp-block-quote.is-style-plain {
4-
padding-right: 1em;
5-
padding-left: 1em;
6-
}

style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Theme Name: Ankur
33
Author: Paul Eiche
44
Description: WordPress block theme with support for color variations and custom patterns.
5-
Version: 1.0.3
5+
Version: 1.0.4
66
Requires at least: 5.9
77
Tested up to: 6.0
88
Requires PHP: 7.4

theme.json

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -191,75 +191,85 @@
191191
"slug": "base",
192192
"size": "1rem",
193193
"fluid": {
194+
"min": "1rem",
194195
"max": "1.125rem"
195196
}
196197
},
197198
{
198199
"name": "xs",
199200
"slug": "xs",
200-
"size": "calc((var(--wp--preset--font-size--base) / var(--wp--custom--text-scale-ratio)) / var(--wp--custom--text-scale-ratio))",
201+
"size": "0.75rem",
201202
"fluid": {
203+
"min": "0.6875rem",
202204
"max": "0.75rem"
203205
}
204206
},
205207
{
206208
"name": "sm",
207209
"slug": "sm",
208-
"size": "calc(var(--wp--preset--font-size--xs) * var(--wp--custom--text-scale-ratio))",
210+
"size": "0.9375rem",
209211
"fluid": {
212+
"min": "0.8125rem",
210213
"max": "0.9375rem"
211214
}
212215
},
213216
{
214217
"name": "md",
215218
"slug": "md",
216-
"size": "calc(var(--wp--preset--font-size--sm) * var(--wp--custom--text-scale-ratio) * var(--wp--custom--text-scale-ratio))",
219+
"size": "1.375rem",
217220
"fluid": {
221+
"min": "1.1875rem",
218222
"max": "1.375rem"
219223
}
220224
},
221225
{
222226
"name": "lg",
223227
"slug": "lg",
224-
"size": "calc(var(--wp--preset--font-size--md) * var(--wp--custom--text-scale-ratio))",
228+
"size": "1.625rem",
225229
"fluid": {
230+
"min": "1.4375rem",
226231
"max": "1.625rem"
227232
}
228233
},
229234
{
230235
"name": "xl",
231236
"slug": "xl",
232-
"size": "calc(var(--wp--preset--font-size--lg) * var(--wp--custom--text-scale-ratio))",
237+
"size": "2rem",
233238
"fluid": {
239+
"min": "1.75rem",
234240
"max": "2rem"
235241
}
236242
},
237243
{
238244
"name": "xxl",
239245
"slug": "xxl",
240-
"size": "calc(var(--wp--preset--font-size--xl) * var(--wp--custom--text-scale-ratio))",
246+
"size": "2.5rem",
241247
"fluid": {
248+
"min": "2.0625rem",
242249
"max": "2.5rem"
243250
}
244251
},
245252
{
246253
"name": "xxxl",
247254
"slug": "xxxl",
248-
"size": "calc(var(--wp--preset--font-size--xxl) * var(--wp--custom--text-scale-ratio))",
255+
"size": "3rem",
249256
"fluid": {
257+
"min": "2.5rem",
250258
"max": "3rem"
251259
}
252260
},
253261
{
254262
"name": "xxxxl",
255263
"slug": "xxxxl",
256-
"size": "calc(var(--wp--preset--font-size--xxxl) * var(--wp--custom--text-scale-ratio))",
264+
"size": "3.625rem",
257265
"fluid": {
266+
"min": "3rem",
258267
"max": "3.625rem"
259268
}
260269
}
261270
],
262-
"lineHeight": true
271+
"lineHeight": true,
272+
"writingMode": true
263273
},
264274
"shadow": {
265275
"presets": [
@@ -592,6 +602,14 @@
592602
"left": "0"
593603
}
594604
}
605+
},
606+
"large": {
607+
"spacing": {
608+
"padding": {
609+
"left": "0",
610+
"right": "0"
611+
}
612+
}
595613
}
596614
}
597615
},

0 commit comments

Comments
 (0)