Skip to content

Commit

Permalink
Restyle block warnings (#5383)
Browse files Browse the repository at this point in the history
* Position warnings near top

* Restrict max height of blocks with warnings, fade

* Ignore swap files

* Rewrite translate as translateX

* Don't ignore swap files
  • Loading branch information
nshki authored and aduth committed Mar 9, 2018
1 parent 09cd0b1 commit 6332d40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions editor/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
&.has-warning .editor-block-list__block-edit {
position: relative;
min-height: 250px;
max-height: 500px;
overflow: hidden;

> :not( .editor-warning ) {
pointer-events: none;
Expand All @@ -59,6 +61,7 @@
bottom: 0;
left: 0;
background-color: rgba( $white, 0.6 );
background-image: linear-gradient( to bottom, transparent, #fff );
}

// simpler style for a block that has cursor focus (but hasn't been selected)
Expand Down
4 changes: 2 additions & 2 deletions editor/components/warning/style.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.editor-warning {
z-index: z-index( '.editor-warning' );
position: absolute;
top: 50%;
top: 15px;
left: 50%;
transform: translate( -50%, -50% );
transform: translateX( -50% );
display: flex;
flex-direction: column;
justify-content: space-around;
Expand Down

0 comments on commit 6332d40

Please sign in to comment.