Skip to content

Commit

Permalink
nest content styles in container for higher specificity
Browse files Browse the repository at this point in the history
  • Loading branch information
Addison-Stavlo committed Oct 27, 2020
1 parent 28cdde9 commit 7678640
Showing 1 changed file with 30 additions and 31 deletions.
61 changes: 30 additions & 31 deletions packages/block-editor/src/components/block-preview/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,45 +15,44 @@
padding: 0;
margin: 0;
}
}

.block-editor-block-preview__content {
// This element receives inline styles for width, height, and transform-scale.
// Those inline styles are calculated to fit a perfect thumbnail.

// Position above the padding.
position: absolute;
.block-editor-block-preview__content {
// This element receives inline styles for width, height, and transform-scale.
// Those inline styles are calculated to fit a perfect thumbnail.

// Vertical alignment. It works with the transform: translate(-50%, -50%)`,
top: 0;
left: 0;
// Position above the padding.
position: absolute;

// Important to set the origin.
transform-origin: top left;
// Vertical alignment. It works with the transform: translate(-50%, -50%)`,
top: 0;
left: 0;

// Resetting paddings, margins, and other.
// Important to set the origin.
transform-origin: top left;

text-align: initial;
margin: 0;
overflow: visible;
min-height: auto;
// Resetting paddings, margins, and other.

.block-editor-block-list__insertion-point,
.block-editor-block-drop-zone,
.reusable-block-indicator,
.block-list-appender {
display: none;
}
text-align: initial;
margin: 0;
overflow: visible;
min-height: auto;

.block-editor-block-list__insertion-point,
.block-editor-block-drop-zone,
.reusable-block-indicator,
.block-list-appender {
display: none;
}

// Reset default editor padding
.block-editor-block-list__layout.is-root-container {
padding-left: 0;
padding-right: 0;
// Reset default editor padding
.block-editor-block-list__layout.is-root-container {
padding-left: 0;
padding-right: 0;

> .wp-block[data-align="full"] {
margin-left: 0;
margin-right: 0;
> .wp-block[data-align="full"] {
margin-left: 0;
margin-right: 0;
}
}
}
}

0 comments on commit 7678640

Please sign in to comment.