-
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
Apply custom scroll style to fixed header block toolbar #57444
Merged
Merged
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
2f2913b
Apply custom scroll style to fixed header block toolbar
t-hamano 588f2f7
Fix header height
t-hamano 30ba00f
Scope the fix.
jasmussen 395356f
Fix border and parent selector dot
t-hamano 1451d8a
Merge branch 'trunk' into fixed-header-custom-scroll
t-hamano ae6854e
Merge branch 'trunk' into fixed-header-custom-scroll
t-hamano 42c067e
Move styles to each package
t-hamano 96e7976
Merge branch 'trunk' into fixed-header-custom-scroll
t-hamano 8528b3b
Resolve conflicts
t-hamano 3e79edc
Try to get buttons to line up
t-hamano c70eaf7
Try to fix the toolbar shift in the Post Editor
t-hamano 45217e8
Temp
t-hamano f7dbbb6
Merge branch 'trunk' into fixed-header-custom-scroll
t-hamano b6831f5
Try to fix the toolbar shift in the Post Editor
t-hamano 6a0fe59
Try to fix the toolbar shift in the Site Editor
t-hamano 463b266
Try to fix the toolbar shift in the Widget Editor
t-hamano 7692bde
Merge branch 'trunk' into fixed-header-custom-scroll
t-hamano 6020b94
Fix border position when "Show button text labels" is enabled
t-hamano c2de530
Try: Small fix to center, keep the big buttons.
jasmussen 6ce3c2e
Revert "Try: Small fix to center, keep the big buttons."
t-hamano a3c6530
Merge branch 'trunk' into fixed-header-custom-scroll
t-hamano 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,10 @@ | |
.block-editor-block-toolbar { | ||
overflow: auto; | ||
overflow-y: hidden; | ||
@include custom-scrollbars-on-hover($gray-200, $gray-600); | ||
|
||
// Prevents padding from being applied to the left and right sides of the element. | ||
scrollbar-gutter: auto; | ||
|
||
> :last-child, | ||
> :last-child .components-toolbar-group, | ||
|
@@ -84,6 +88,12 @@ | |
display: none; | ||
} | ||
} | ||
|
||
// These rules ensure that icons are always positioned in a way that lines up with the rest of the icons in the toolbar. | ||
.selected-block-tools-wrapper & { | ||
height: $header-height; | ||
padding-top: 7px; // It should be 6px (60px header height - 48px toolbar height = 12 / 2), but there is a -1px top-margin down the stack that affects this. | ||
} | ||
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. Any rules related to the block toolbar within the header should be moved into the |
||
} | ||
|
||
.block-editor-block-toolbar .components-toolbar-group, | ||
|
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
Oops, something went wrong.
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.
The custom scrollbar mixin has a style called scrollbar-gutter: stable both-edges;. To prevent the button from being cut off due to this, we need to override it.