Skip to content

Commit

Permalink
Polish color indicator and itemgroup. (#37028)
Browse files Browse the repository at this point in the history
* Polish color indicator and itemgroup.

* Revert itemgroup changes, add changelog entry.

* Update collapsed panel indicator.

* Use gap instead of margin.
  • Loading branch information
jasmussen authored Dec 2, 2021
1 parent 97ca916 commit e96d47b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 30 deletions.
11 changes: 6 additions & 5 deletions packages/block-editor/src/components/colors-gradients/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
}

.block-editor-panel-color-gradient-settings {
.component-color-indicator {
vertical-align: text-bottom;
}
.block-editor-panel-color-gradient-settings__panel-title {
display: flex;
gap: $grid-unit-15;

&__panel-title {
.component-color-indicator {
display: inline-block;
width: $grid-unit-15;
height: $grid-unit-15;
align-self: center;
}
}

Expand Down
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
### Enhancements

- Wrapped `Modal` in a `forwardRef` call ([#36831](https://github.com/WordPress/gutenberg/pull/36831)).
- Unify styles for `ColorIndicator` with how they appear in Global Styles ([#37028](https://github.com/WordPress/gutenberg/pull/37028))

## 19.1.0

Expand Down
13 changes: 5 additions & 8 deletions packages/components/src/color-indicator/style.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
.component-color-indicator {
width: 25px;
height: 16px;
margin-left: 0.8rem;
border: 1px solid #dadada;
width: $grid-unit-50 * 0.5;
height: $grid-unit-50 * 0.5;
border-radius: 50%;
border: $border-width solid $gray-300;
display: inline-block;

& + & {
margin-left: 0.5rem;
}
padding: 0;
}
17 changes: 0 additions & 17 deletions packages/edit-site/src/components/global-styles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@
justify-content: center;
min-height: 152px;
line-height: 1;

.component-color-indicator {
border-radius: 50%;
border: 0;
height: 36px;
width: 36px;
margin-left: 0;
padding: 0;
}
}

.edit-site-typography-panel__preview {
Expand Down Expand Up @@ -43,14 +34,6 @@
margin: $grid-unit-20;

.component-color-indicator {
margin-left: 0;
display: block;
border-radius: 50%;
height: 24px;
width: 24px;
padding: 0;
border: $border-width solid $gray-300;

// Show a diagonal line (crossed out) for empty swatches.
background: linear-gradient(-45deg, transparent 48%, $gray-300 48%, $gray-300 52%, transparent 52%);
}
Expand Down

0 comments on commit e96d47b

Please sign in to comment.