Skip to content

Commit

Permalink
Adjust width
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka committed Aug 8, 2022
1 parent 2afe900 commit cb1b99a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
4 changes: 4 additions & 0 deletions packages/edit-site/src/components/global-styles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
border-radius: $radius-block-ui;
}

.edit-site-typography-panel__half-width-control {
width: calc((100% - #{$grid-unit-30}) / 2);
}

.edit-site-global-styles-screen-heading-color,
.edit-site-global-styles-screen-typography {
margin: $grid-unit-20;
Expand Down
35 changes: 20 additions & 15 deletions packages/edit-site/src/components/global-styles/typography-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export default function TypographyPanel( { name, element } ) {
value={ selectedLevel }
onChange={ setCurrentTab }
isBlock
size="__unstable-large"
>
<ToggleGroupControlOption
value="heading"
Expand Down Expand Up @@ -205,15 +206,17 @@ export default function TypographyPanel( { name, element } ) {
/>
) }
{ hasLineHeightEnabled && (
<Spacer marginBottom={ 6 }>
<LineHeightControl
__nextHasNoMarginBottom={ true }
__unstableInputWidth={ '50%' }
value={ lineHeight }
onChange={ setLineHeight }
size="__unstable-large"
/>
</Spacer>
<div className="edit-site-typography-panel__half-width-control">
<Spacer marginBottom={ 6 }>
<LineHeightControl
__nextHasNoMarginBottom={ true }
__unstableInputWidth="auto"
value={ lineHeight }
onChange={ setLineHeight }
size="__unstable-large"
/>
</Spacer>
</div>
) }
{ hasAppearanceControl && (
<FontAppearanceControl
Expand All @@ -235,12 +238,14 @@ export default function TypographyPanel( { name, element } ) {
/>
) }
{ hasLetterSpacingControl && (
<LetterSpacingControl
value={ letterSpacing }
onChange={ setLetterSpacing }
size="__unstable-large"
__unstableInputWidth={ '50%' }
/>
<div className="edit-site-typography-panel__half-width-control">
<LetterSpacingControl
value={ letterSpacing }
onChange={ setLetterSpacing }
size="__unstable-large"
__unstableInputWidth="auto"
/>
</div>
) }
</PanelBody>
);
Expand Down

0 comments on commit cb1b99a

Please sign in to comment.