Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Jan 18, 2023
1 parent 6c5fac6 commit 3d209f1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* External dependencies
*/
import classnames from 'classnames';

/**
* WordPress dependencies
*/
Expand Down Expand Up @@ -98,7 +103,13 @@ function ScreenBackgroundColor( { name, variationPath = '' } ) {
) }
/>
<ColorGradientControl
className="edit-site-screen-background-color__control"
className={ classnames(
'edit-site-screen-background-color__control',
{
'has-no-tabs':
! hasBackgroundColor || ! hasGradientColor,
}
) }
colors={ colorsPerOrigin }
gradients={ gradientsPerOrigin }
disableCustomColors={ ! areCustomSolidsEnabled }
Expand Down
9 changes: 2 additions & 7 deletions packages/edit-site/src/components/global-styles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,11 @@ $block-preview-height: 150px;

.edit-site-screen-text-color__control,
.edit-site-screen-link-color__control,
.edit-site-screen-button-color__control {
.edit-site-screen-button-color__control,
.edit-site-screen-background-color__control.has-no-tabs {
padding: $grid-unit-20;
}

.edit-site-screen-background-color__control {
.block-editor-color-gradient-control__panel {
padding: $grid-unit-20;
}
}

.edit-site-global-styles-variations_item {
box-sizing: border-box;

Expand Down

0 comments on commit 3d209f1

Please sign in to comment.