-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Polish mobile toolbar #7278
Polish mobile toolbar #7278
Changes from 4 commits
e3740df
83ae1ea
32ae608
805e6b8
0462666
47374b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -581,17 +581,27 @@ | |
} | ||
} | ||
|
||
// Show side UI inline below the block on mobile | ||
// Show side UI inline below the block on mobile. | ||
.editor-block-list__block-mobile-toolbar { | ||
display: flex; | ||
flex-direction: row; | ||
margin-top: $item-spacing; | ||
margin-top: $item-spacing + $block-toolbar-height; // Make room for the formatting bar above. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment helps, but |
||
margin-right: -$block-padding; | ||
margin-bottom: -$block-padding - 1px; // Include border. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the border is the |
||
margin-left: -$block-padding; | ||
border-top: 1px solid $light-gray-500; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, looks like this |
||
|
||
@include break-small() { | ||
display: none; | ||
} | ||
|
||
// Movers, inserter, trash & ellipsis | ||
// Show a shadow below the selected block to imply separation. | ||
box-shadow: $shadow-below-only; | ||
@include break-mobile() { | ||
box-shadow: none; | ||
} | ||
|
||
// Movers, inserter, trash & ellipsis. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't we use Oxford commas in WordPress style? This should be |
||
.editor-inserter { | ||
position: relative; | ||
left: auto; | ||
|
@@ -659,7 +669,12 @@ | |
} | ||
|
||
.editor-block-list__insertion-point-inserter { | ||
display: flex; | ||
// Don't show on mobile. | ||
display: none; | ||
@include break-mobile() { | ||
display: flex; | ||
} | ||
|
||
position: absolute; | ||
top: 0; | ||
bottom: auto; | ||
|
@@ -753,18 +768,17 @@ | |
|
||
// Position toolbar below the block on mobile | ||
position: absolute; | ||
bottom: -$block-toolbar-height + 1px; | ||
//bottom: -$block-toolbar-height + 1px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔥 |
||
bottom: $block-toolbar-height; | ||
left: $block-padding; | ||
right: $block-padding; | ||
box-shadow: $shadow-below-only; | ||
|
||
// Position the contextual toolbar above the block, add 1px to each to stack borders | ||
@include break-mobile() { | ||
position: sticky; | ||
bottom: auto; | ||
left: auto; | ||
right: auto; | ||
box-shadow: none; | ||
margin-top: -$block-toolbar-height - 1px; | ||
margin-bottom: $block-padding + 1px; | ||
} | ||
|
@@ -813,9 +827,13 @@ | |
width: 100%; | ||
background: $white; | ||
border: 1px solid $light-gray-500; | ||
border-right: none; | ||
|
||
// this prevents floats from messing up the position | ||
// Hide right border on desktop, where the .components-toolbar instead has a right border. | ||
@include break-small() { | ||
border-right: none; | ||
} | ||
|
||
// This prevents floats from messing up the position. | ||
position: absolute; | ||
left: 0; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,10 @@ | |
flex-grow: 1; | ||
width: 100%; | ||
background: $white; | ||
overflow: auto; // allow horizontal scrolling on mobile | ||
overflow: auto; // Allow horizontal scrolling on mobile. | ||
position: relative; | ||
|
||
// allow overflow on desktop | ||
// Allow overflow on desktop. | ||
@include break-small() { | ||
overflow: inherit; | ||
} | ||
|
@@ -18,7 +18,6 @@ | |
border-right: 1px solid $light-gray-500; | ||
} | ||
|
||
// this should probably have its own class | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this actually no longer the case? I'd still agree with the comment, I don't like seeing selectors like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My thinking in removing this comment was perhaps fast and loose. I think it's still the case that it should be a class, but I this not happening in the near future, and instead of leaving a "note to self" might as well remove it. I remember trying to add the class, but not finding a clean way to do it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All of that sounds useful to know, and rather like the comment should be expanded upon rather than deleted 😄 |
||
> div { | ||
display: flex; | ||
} | ||
|
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 get why this is but a comment to explain it would be great 😄