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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update color picker hover colors - RSC-1547 #1177

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions lib/src/components/NxColorPicker/NxColorPicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
@use 'sass:math';
@use "../../scss-shared/nx-container-helpers";
@use '../../scss-shared/nx-color-picker-variables';

.nx-color-picker {
@include nx-container-helpers.container-horizontal;
Expand All @@ -28,6 +29,7 @@
&:hover {
.nx-color-picker__color {
stroke: var(--nx-color-text-stark);
fill: var(--nx-color-picker-hover-background);
}
}

Expand Down
46 changes: 46 additions & 0 deletions lib/src/scss-shared/_nx-color-picker-variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright (c) 2019-present Sonatype, Inc.
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/.
*/

Copy link
Contributor

Choose a reason for hiding this comment

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

I see that this follows the same pattern as the tag variables and that's good. However, I'm now realizing that that pattern violations one of the rules of our folder organization. See the following from the readme in this directory:

The files in this directory must not emit anything on their own when compiled, as anything that they
do emit would be duplicated every time one of the files is imported

We should create a separate ticket to clean this up; but continue as-is for this PR.

.nx-selectable-color--purple {
--nx-color-picker-hover-background: var(--nx-swatch-purple-70);
}

.nx-selectable-color--pink {
--nx-color-picker-hover-background: var(--nx-swatch-pink-70);
}

.nx-selectable-color--blue {
--nx-color-picker-hover-background: var(--nx-swatch-teal-40);
}

.nx-selectable-color--red {
--nx-color-picker-hover-background: var(--nx-swatch-red-70);
}

.nx-selectable-color--turquoise {
--nx-color-picker-hover-background: var(--nx-swatch-turquoise-30);
}

.nx-selectable-color--orange {
--nx-color-picker-hover-background: var(--nx-swatch-orange-50);
}

.nx-selectable-color--yellow {
--nx-color-picker-hover-background: var(--nx-swatch-yellow-55);
}

.nx-selectable-color--kiwi {
--nx-color-picker-hover-background: var(--nx-swatch-green-30);
}

.nx-selectable-color--sky {
--nx-color-picker-hover-background: var(--nx-swatch-blue-70);
}

.nx-selectable-color--indigo {
--nx-color-picker-hover-background: var(--nx-swatch-indigo-60);
}