Skip to content

Commit 5af6c8c

Browse files
committed
harmonize gap rules, fix CSS for Grid block
1 parent 46cda66 commit 5af6c8c

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

src/scss/03-base/_variables-css.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
/*
3737
* Spacing
3838
*/
39+
--spacing--block-default: 16px;
3940
--spacing--block-1: 16px;
4041
--spacing--block-2: 32px;
4142
--spacing--block-3: 48px;

src/scss/06-blocks/_gutenberg.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,16 @@
102102
margin-bottom: var(--spacing--block-1);
103103
}
104104

105+
:where(.is-layout-flex),
106+
:where(.is-layout-grid) {
107+
gap: get-gutter-width();
108+
}
109+
105110
// ----
106111
// Alignements verticaux
107112
// ----
108113
> *,
109-
[class*="inner-container"] > * {
114+
[class*="inner-container"]:not(.is-layout-grid) > * {
110115
margin-top: var(--spacing--block-1);
111116
margin-bottom: var(--spacing--block-1);
112117

src/scss/06-blocks/core/_columns.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.wp-block-columns {
22
@include block-vertical-spacing();
3-
gap: get-gutter-width() !important;
43

54
.wp-block-column {
65
&.has-background {

src/scss/06-blocks/core/_gallery.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// .wp-block-gallery {
2-
// ...
3-
// }
1+
.wp-block-gallery {
2+
--wp--style--gallery-gap-default: #{get-gutter-width()} !important;
3+
}

src/scss/06-blocks/core/_group.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
.wp-block-group {
22
$el: &;
33

4-
display: flow-root;
4+
&:not(.is-layout-grid) {
5+
display: flow-root;
6+
}
57

68
&--no-inner-margin {
79
#{$el}__inner-container {
@@ -21,7 +23,9 @@
2123

2224
@include editor-only {
2325
.wp-block-group {
24-
display: flow-root;
26+
&:not(.is-layout-grid) {
27+
display: flow-root;
28+
}
2529

2630
.wp-block-group.has-background > .block-editor-block-list__layout > [data-align="full"] {
2731
width: 100%;

0 commit comments

Comments
 (0)