-
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
Changes from 4 commits
2f2913b
588f2f7
30ba00f
395356f
1451d8a
ae6854e
42c067e
96e7976
8528b3b
3e79edc
c70eaf7
45217e8
f7dbbb6
b6831f5
6a0fe59
463b266
7692bde
6020b94
c2de530
6ce3c2e
a3c6530
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 |
---|---|---|
|
@@ -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, | ||
|
@@ -105,7 +115,10 @@ | |
position: absolute; | ||
font-size: 16px; | ||
right: 0; | ||
bottom: $grid-unit-20; | ||
height: $grid-unit-60; | ||
top: 0; | ||
display: inline-flex; | ||
align-items: center; | ||
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. Since this dot is a font, its height may change depending on the |
||
} | ||
} | ||
|
||
|
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.