Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Color picker] Refactor checker board background #3812

Merged
merged 3 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f
- Removed `-ms-high-contrast` media query from `ms-high-contrast-outline` as it is non-standard and updated the outline color from `windowText` to `transparent` ([#3775](https://github.com/Shopify/polaris-react/pull/3775)).
- Fixed `Collapsible` expand and collapse animation ([#3779](https://github.com/Shopify/polaris-react/pull/3779))
- Fixed a bug in `Page` where re-rendering of `secondaryActions` could cause layout jittering ([#3641](https://github.com/Shopify/polaris-react/pull/3641))
- Fixed `ColorPicker` checker background to remain visible on a white background ([#3812](https://github.com/Shopify/polaris-react/pull/3812))

### Documentation

Expand Down
16 changes: 5 additions & 11 deletions src/components/ColorPicker/ColorPicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,11 @@ $stacking-order: (
);

@mixin checkers {
background-image: linear-gradient(
45deg,
var(--p-surface) 25%,
transparent 25%
),
linear-gradient(-45deg, var(--p-surface) 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, var(--p-surface) 75%),
linear-gradient(-45deg, transparent 75%, var(--p-surface) 75%);
background-size: spacing() spacing();
background-position: 0 0, 0 spacing(tight), spacing(tight) -1 * spacing(tight),
-1 * spacing(tight) 0;
background: repeating-conic-gradient(
var(--p-surface) 0% 25%,
var(--p-surface-neutral-subdued) 0% 50%
)
50% / #{spacing() spacing()};
Comment on lines +14 to +18
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL! This looks like a great cleanup 馃憦

}

.ColorPicker {
Expand Down