Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
Merge pull request #783 from WordPress/vertical-margins
Browse files Browse the repository at this point in the history
Update vertical margins for full width blocks
  • Loading branch information
carolinan committed Nov 5, 2020
2 parents a39d50f + dcf381c commit 209d3b3
Show file tree
Hide file tree
Showing 11 changed files with 90 additions and 28 deletions.
22 changes: 16 additions & 6 deletions assets/css/ie-editor.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions assets/css/ie.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 16 additions & 6 deletions assets/css/style-editor.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions assets/sass/05-blocks/cover/_editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
margin-top: inherit;
margin-bottom: inherit;

[data-align="full"] & {
margin-top: 0;
margin-bottom: 0;
}

.wp-block-cover__inner-container,
.wp-block-cover-image-text,
.wp-block-cover-text,
Expand Down
5 changes: 5 additions & 0 deletions assets/sass/05-blocks/cover/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
clear: both;
}

&.alignfull {
margin-top: 0;
margin-bottom: 0;
}

background-color: var(--cover--color-background);
min-height: var(--cover--height);
margin-top: inherit;
Expand Down
5 changes: 5 additions & 0 deletions assets/sass/05-blocks/group/_editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

&.has-background {
padding: var(--global--spacing-vertical);

[data-align="full"] & {
margin-top: 0;
margin-bottom: 0;
}
}

// Block Styles
Expand Down
5 changes: 5 additions & 0 deletions assets/sass/05-blocks/media-text/_editor.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
.wp-block-media-text {

[data-align="full"] & {
margin-top: 0;
margin-bottom: 0;
}

.wp-block-media-text__content {
padding: var(--global--spacing-horizontal);

Expand Down
5 changes: 5 additions & 0 deletions assets/sass/05-blocks/media-text/_style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
.wp-block-media-text {

&.alignfull {
margin-top: 0;
margin-bottom: 0;
}

a:focus img {
outline-offset: -1px;
}
Expand Down
16 changes: 0 additions & 16 deletions assets/sass/05-blocks/utilities/_editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,6 @@
}
}

// Selects the post editor and not the site editor
.block-editor-block-list__layout:not(.edit-site-block-editor__block-list) {

.wp-block {

&[data-align="full"],
&.alignfull {

>[data-block] {
margin-top: 0;
margin-bottom: 0;
}
}
}
}

.alignleft {
margin: 0;
margin-right: var(--global--spacing-horizontal);
Expand Down
11 changes: 11 additions & 0 deletions style-rtl.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 209d3b3

Please sign in to comment.