-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blocks: update warning style #7866
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
745c013
Block warning: restyle and move buttons inline with message
johngodley c7ee23b
Block warning: restyle and move buttons inline with message
johngodley 0ebaf1d
Blocks: move BlockCrash down a level
johngodley 3f2435b
Blocks: rename InvalidBlock to BlockInvalid
johngodley 9192973
Polish the warning message.
johngodley db48521
Polish mobile and wrapping paddings.
jasmussen d531fb9
Block: change ‘edit as HTML’ text
johngodley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,53 @@ | ||
.editor-warning { | ||
.editor-block-list__block .editor-warning { | ||
z-index: z-index( '.editor-warning' ); | ||
position: absolute; | ||
top: 0; | ||
top: -$block-padding - $border-width; | ||
right: -$parent-block-padding - $border-width; | ||
left: -$parent-block-padding - $border-width; | ||
|
||
// Position for nested blocks | ||
.editor-block-list__block & { | ||
right: -$block-padding - $border-width; | ||
left: -$block-padding - $border-width; | ||
} | ||
|
||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-around; | ||
align-items: center; | ||
max-width: 780px; | ||
width: calc( 100% - #{ $parent-block-padding * 2 + $block-padding * 2 } ); | ||
padding: 20px; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
flex-wrap: nowrap; | ||
background-color: $white; | ||
border: 1px solid $light-gray-500; | ||
text-align: center; | ||
line-height: $default-line-height; | ||
font-family: $default-font; | ||
font-size: $default-font-size; | ||
} | ||
text-align: left; | ||
|
||
.editor-warning__actions { | ||
display: flex; | ||
margin-top: 20px; | ||
} | ||
// Bigger padding on mobile where blocks are edge to edge. | ||
padding: $block-padding $parent-block-padding 0 $parent-block-padding; | ||
@include break-small() { | ||
padding: $block-padding $block-padding 0 $block-padding; | ||
} | ||
|
||
.editor-warning__message { | ||
line-height: $default-line-height; | ||
font-family: $default-font; | ||
font-size: $default-font-size; | ||
margin: 0 0 $block-padding 0; | ||
} | ||
|
||
.editor-warning__contents { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
flex-wrap: wrap; | ||
align-items: center; | ||
width: 100%; | ||
} | ||
|
||
.editor-warning__action { | ||
margin: 0 #{ $item-spacing / 2 } 5px; | ||
} | ||
.editor-warning__actions { | ||
display: flex; | ||
margin: 0 0 $block-padding 0; | ||
} | ||
|
||
.editor-warning__action { | ||
margin: 0 6px 0 0; | ||
margin-left: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mentioned at #7886 (comment) that this component is used for more than just the warning for the single block in a list. It's also used for the top-level error handler, which this change broke. See #8677.