-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace text control to set section index on attributes
- Loading branch information
1 parent
02c98cc
commit bc6d240
Showing
5 changed files
with
87 additions
and
49 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
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.block-editor-sections { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
gap: $grid-unit-10; | ||
|
||
button.components-button.block-editor-sections__item { | ||
color: $gray-900; | ||
box-shadow: inset 0 0 0 $border-width $gray-300; | ||
display: inline-block; | ||
width: calc(50% - #{$grid-unit-05}); | ||
|
||
&:hover { | ||
color: var(--wp-admin-theme-color); | ||
box-shadow: inset 0 0 0 $border-width $gray-300; | ||
} | ||
|
||
&.is-active, | ||
&.is-active:hover { | ||
background-color: $gray-900; | ||
box-shadow: none; | ||
} | ||
|
||
&.is-active .block-editor-sections__item-text, | ||
&.is-active:hover .block-editor-sections__item-text { | ||
color: $white; | ||
} | ||
|
||
&:focus, | ||
&.is-active:focus { | ||
@include block-toolbar-button-style__focus(); | ||
} | ||
} | ||
|
||
.block-editor-sections__item-text { | ||
word-break: break-all; | ||
// The Button component is white-space: nowrap, and that won't work with line-clamp. | ||
white-space: normal; | ||
|
||
// Without this, the ellipsis can sometimes be partially hidden by the Button padding. | ||
text-align: start; | ||
text-align-last: center; | ||
} | ||
} |
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