Skip to content

Commit 0b1b9df

Browse files
authored
Merge pull request #420 from BeAPI/harmonize-gap-rules
Harmonize gap rules // Fix CSS for Grid block.
2 parents 3a2f2d3 + f603114 commit 0b1b9df

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

src/scss/06-blocks/_gutenberg.scss

+6-1
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

-1
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

+3-3
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

+6-2
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)