Skip to content

Commit

Permalink
Try: Padding fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen committed Apr 12, 2021
1 parent 67fd0f8 commit a05db3e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions blocks/layout-grid/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

/* autoprefixer grid: no-autoplace */

.wp-block-jetpack-layout-grid-editor,
.wp-block-jetpack-layout-grid {
// This padding adds end gutters.
padding-left: 24px;
Expand Down Expand Up @@ -46,39 +46,39 @@

// Additional, user-set paddings.
// Apply both gutter padding and user-set padding, when a background is also set.
&.wp-block-jetpack-layout-grid__padding-none {
.wp-block-jetpack-layout-grid__padding-none {
padding: $padding-none;

&.has-background {
padding: $padding-none ($padding-none + $grid-gutter__background-offset);
}
}

&.wp-block-jetpack-layout-grid__padding-small .wp-block-jetpack-layout-grid-column {
.wp-block-jetpack-layout-grid__padding-small .wp-block-jetpack-layout-grid-column {
padding: $padding-small;

&.has-background {
padding: $padding-small ($padding-small + $grid-gutter__background-offset);
}
}

&.wp-block-jetpack-layout-grid__padding-medium .wp-block-jetpack-layout-grid-column {
.wp-block-jetpack-layout-grid__padding-medium .wp-block-jetpack-layout-grid-column {
padding: $padding-medium;

&.has-background {
padding: $padding-medium ($padding-medium + $grid-gutter__background-offset);
}
}

&.wp-block-jetpack-layout-grid__padding-large .wp-block-jetpack-layout-grid-column {
.wp-block-jetpack-layout-grid__padding-large .wp-block-jetpack-layout-grid-column {
padding: $padding-large;

&.has-background {
padding: $padding-large ($padding-large + $grid-gutter__background-offset);
}
}

&.wp-block-jetpack-layout-grid__padding-huge .wp-block-jetpack-layout-grid-column {
.wp-block-jetpack-layout-grid__padding-huge .wp-block-jetpack-layout-grid-column {
padding: $padding-huge;

&.has-background {
Expand All @@ -92,6 +92,7 @@
* Individual Column Options
*/

.wp-block-jetpack-layout-grid-editor .wp-block-jetpack-layout-grid-column,
.wp-block-jetpack-layout-grid .wp-block-jetpack-layout-grid-column {
// When a column has a background color, we add negative margins to enable
// some of the gutter to work as default padding.
Expand Down

0 comments on commit a05db3e

Please sign in to comment.