Skip to content

Commit

Permalink
ColorPalette: Fix background image in RTL mode (#42510)
Browse files Browse the repository at this point in the history
* ColorPalette: Fix background image in RTL mode

* Update CHANGELOG.md

* Update CHANGELOG.md

* Ignore background image

* Add comments.
  • Loading branch information
Petter Walbø Johnsgård committed Jul 25, 2022
1 parent 5930437 commit a256669
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- `Popover`, `Dropdown`: Fix width when `expandOnMobile` is enabled ([#42635](https://github.com/WordPress/gutenberg/pull/42635/)).
- `CustomSelectControl`: Fix font size and hover/focus style inconsistencies with `SelectControl` ([#42460](https://github.com/WordPress/gutenberg/pull/42460/)).
- `AnglePickerControl`: Fix gap between elements in RTL mode ([#42534](https://github.com/WordPress/gutenberg/pull/42534)).
- `ColorPalette`: Fix background image in RTL mode ([#42510](https://github.com/WordPress/gutenberg/pull/42510)).
- `RangeControl`: clamp initialPosition between min and max values ([#42571](https://github.com/WordPress/gutenberg/pull/42571)).
- `Tooltip`: avoid unnecessary re-renders of select child elements ([#42483](https://github.com/WordPress/gutenberg/pull/42483)).

Expand Down
5 changes: 5 additions & 0 deletions packages/components/src/color-palette/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
padding: $grid-unit-15;
font-family: inherit;
width: 100%;
// The background image creates a checkerboard pattern. Ignore rtlcss to
// make it work both in LTR and RTL.
// See https://github.com/WordPress/gutenberg/pull/42510
/*rtl:begin:ignore*/
background-image:
repeating-linear-gradient(45deg, $gray-200 25%, transparent 25%, transparent 75%, $gray-200 75%, $gray-200),
repeating-linear-gradient(45deg, $gray-200 25%, transparent 25%, transparent 75%, $gray-200 75%, $gray-200);
background-position: 0 0, 25px 25px;
/*rtl:end:ignore*/
background-size: calc(2 * 25px) calc(2 * 25px);
box-sizing: border-box;
color: $white;
Expand Down

0 comments on commit a256669

Please sign in to comment.