Skip to content

Commit ca70c0c

Browse files
committed
add wrapper to other blocks, add dev notes, separate buttons
1 parent 06f556a commit ca70c0c

File tree

18 files changed

+186
-122
lines changed

18 files changed

+186
-122
lines changed

src/block/columns/editor.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@
2828

2929
.stk-block-columns > .stk-block-content > .block-editor-inner-blocks > .block-editor-block-list__layout {
3030
column-gap: var(--stk-column-gap, 0px);
31-
row-gap: var(--stk-columns-row-gap, 0px);
31+
}
32+
33+
// These are styles added from the global spacing and borders.
34+
:where(.stk-has-design-system-spacing-and-borders) {
35+
.stk-block-columns > .stk-block-content > .block-editor-inner-blocks > .block-editor-block-list__layout {
36+
row-gap: var(--stk-columns-row-gap, 0px);
37+
}
3238
}
3339

3440
// For Firefox polyfill

src/block/columns/style.scss

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@
99
}
1010

1111
.stk-block-columns > .stk-block-content {
12-
--stk-column-gap: var(--stk-columns-column-gap, 0px); // For nested columns, this takes precedence.
12+
--stk-column-gap: 0px; // For nested columns, this takes precedence.
1313
column-gap: var(--stk-column-gap);
14-
row-gap: var(--stk-columns-row-gap, 0px);
1514
margin-left: auto;
1615
margin-right: auto;
1716
}
1817

18+
// These are styles added from the global spacing and borders.
19+
:where(.stk-has-design-system-spacing-and-borders) {
20+
.stk-blocks-columns > .stk-block-content {
21+
--stk-column-gap: var(--stk-columns-column-gap, 0px); // For nested columns, this takes precedence.
22+
row-gap: var(--stk-columns-row-gap, 0px);
23+
}
24+
}
25+
1926
// Add a 0 specificity style to set the default column order. This is to prevent
2027
// the column order from spilling to nested blocks.
2128
// Target the stk-column-wrapper to also include blocks with column innerblocks

src/block/countdown/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
margin: 0;
6161
}
6262

63+
// These are styles added from the global color schemes.
6364
:where(.stk-has-color-schemes) {
6465
.stk-block-countdown__digit {
6566
color: var(--stk-accent-color);

src/block/divider/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
}
88
}
99

10+
// These are styles added from the global color schemes.
1011
:where(.stk-has-color-schemes) {
1112
.stk-block.stk-block-divider {
1213
hr.stk-block-divider__hr,

src/block/icon-list-item/style.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@
8484
.stk-block-icon-list-item__marker::before {
8585
content: counter(stk-icon-list-counter, var(--stk-list-style-type, decimal)) ". ";
8686
display: block;
87-
font-size: var(--stk-icon-list-icon-size, 16px);
87+
// In Global Buttons and Icons, we renamed `--stk-icon-height` to `--stk-icon-list-icon-size`.
88+
// Keep the `--stk-icon-height` for backward compatibility.
89+
font-size: var(--stk-icon-height, var(--stk-icon-list-icon-size, 16px));
8890
color: var(--stk-icon-list-marker-color);
8991
transform: rotate(var(--stk-icon-list-icon-rotation, 0deg));
9092
opacity: var(--stk-icon-list-icon-opacity, 1);

src/block/icon-list/editor.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
top: 0;
1717
left: 0;
1818
height: 1em;
19-
width: var(--stk-icon-list-icon-size, 1em);
19+
// In Global Buttons and Icons, we renamed `--stk-icon-height` to `--stk-icon-list-icon-size`.
20+
// Keep the `--stk-icon-height` for backward compatibility.
21+
width: var(--stk-icon-height, var(--stk-icon-list-icon-size, 1em));
2022
cursor: copy;
21-
margin-left: calc(var(--stk-icon-list-icon-size, 1em) * -1);
23+
margin-left: calc(var(--stk-icon-height, var(--stk-icon-list-icon-size, 1em)) * -1);
2224
}
2325
}
2426

src/block/number-box/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ div.stk-block-number-box__text {
2020
}
2121
}
2222

23+
// These are styles added from the global color schemes.
2324
:where(.stk-has-color-schemes) .stk-block-number-box.stk--has-shape {
2425
.stk-block-number-box__container,
2526
div.stk-block-number-box__text {

src/block/progress-bar/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
}
4747
}
4848

49+
// These are styles added from the global color schemes.
4950
:where(.stk-has-color-schemes) {
5051
.stk-block-progress-bar {
5152
--progress-color-1: var(--stk-accent-color);

src/block/progress-circle/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
}
5555
}
5656

57+
// These are styles added from the global color schemes.
5758
:where(.stk-has-color-schemes) {
5859
.stk-block-progress-circle {
5960
--progress-color-1: var(--stk-accent-color);

src/block/table-of-contents/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
}
4040
}
4141

42+
// These are styles added from the global color schemes.
4243
:where(.stk-has-color-schemes) {
4344
.stk-block-table-of-contents {
4445
// Add this so that it inherits the color from global color schemes.

0 commit comments

Comments
 (0)