Skip to content

Commit 2ad2fcc

Browse files
committed
fix UI for long block style labels
1 parent 8c9b24b commit 2ad2fcc

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

src/components/block-styles-control/editor.scss

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,25 @@
55

66
.ugb-block-styles-controls__wrapper {
77
position: relative;
8+
display: grid;
9+
grid-template-columns: 1fr auto;
10+
align-items: center;
11+
gap: 4px;
812

913
.ugb-block-styles-controls__block-style-button {
1014
padding-right: 6px;
15+
display: inline-block;
16+
height: auto;
17+
line-height: 1.4;
18+
text-align: left;
19+
place-self: flex-start;
1120
}
1221

13-
&.has-modified {
14-
padding-right: 28px;
15-
16-
.stk-control__reset-button {
17-
right: 0;
18-
top: 0;
19-
color: var(--stk-skin-error);
20-
}
22+
.stk-control__reset-button {
23+
position: relative;
24+
top: 0;
25+
right: 0;
26+
color: var(--stk-skin-error);
2127
}
2228
}
2329

src/components/block-styles-control/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ export const BlockStylesControl = props => {
160160
} }
161161
ref={ buttonRef }
162162
>
163-
{ `${ __( 'Block Style', i18n ) }: ${ blockStyleLabel }${ isModified && inBlockStyleOptions ? ` (${ __( 'Modified', i18n ) })` : '' }` }
163+
{ `${ __( 'Block Style', i18n ) }:` } <wbr /> { blockStyleLabel }{ isModified && inBlockStyleOptions ? ` (${ __( 'Modified', i18n ) })` : '' }
164+
164165
</Button>
165166
<ResetButton
166167
allowReset={ true }

0 commit comments

Comments
 (0)