Skip to content

Commit

Permalink
Consolidate editor and save styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ajlende committed Jan 21, 2021
1 parent f236e7f commit 21dfbb7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
6 changes: 0 additions & 6 deletions packages/block-library/src/cover/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@
.wp-block-cover__placeholder-background-options {
width: 100%;
}

// Fix object-fit when block is full width in the editor.
.wp-block-cover__image-background {
width: inherit;
height: inherit;
}
}

[data-align="left"] > .wp-block-cover,
Expand Down
23 changes: 12 additions & 11 deletions packages/block-library/src/cover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,19 @@
width: auto;
}
}
}

.wp-block-cover__image-background,
.wp-block-cover__video-background {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: inherit;
height: inherit;
object-fit: cover;
// Extra specificity for in edit mode where other styles would override it otherwise.
img.wp-block-cover__image-background,
video.wp-block-cover__video-background {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: inherit;
height: inherit;
object-fit: cover;
}
}

.wp-block-cover__video-background {
Expand Down

0 comments on commit 21dfbb7

Please sign in to comment.