Skip to content

Commit

Permalink
Global Styles: add padding when no tabs in the background panel (#44044)
Browse files Browse the repository at this point in the history
* Global Styles: add padding when no tabs in the background panel

* refactoring
  • Loading branch information
t-hamano authored Jan 19, 2023
1 parent 014f85d commit ea61b1b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 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
3 changes: 2 additions & 1 deletion packages/edit-site/src/components/global-styles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ $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;
}

Expand Down

1 comment on commit ea61b1b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in ea61b1b.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3954961233
📝 Reported issues:

Please sign in to comment.