-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use padding to optically size multiple buttons.
- Loading branch information
Showing
3 changed files
with
38 additions
and
19 deletions.
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
22 changes: 6 additions & 16 deletions
22
packages/block-editor/src/components/rich-text/format-toolbar/style.scss
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,24 +1,14 @@ | ||
.block-editor-format-toolbar { | ||
// Size the formatting buttons to be optically balanced. | ||
// Specifically, buttons in a toolbar group are not all 48px. | ||
// They are 36px, except for the first and the last, which have | ||
// an additional 6px padding left or right. | ||
.components-toolbar > div { | ||
width: 48px - 6px - 6px; | ||
} | ||
|
||
.components-toolbar > div:first-child button { | ||
padding-left: $grid-unit-10 + 6px; | ||
} | ||
|
||
.components-toolbar > div:last-child button { | ||
padding-right: $grid-unit-10 + 6px; | ||
} | ||
|
||
.components-dropdown-menu__toggle { | ||
justify-content: center; | ||
|
||
// @todo: this should be the same icon as the DownArrow from the mover control. | ||
&::after { | ||
@include dropdown-arrow(); | ||
|
||
// The dropdown is 6px wide. To have the same footprint as a 24px icon, we add 9px margin left and right. | ||
margin-left: 9px; | ||
margin-right: 9px; | ||
} | ||
} | ||
} |