Skip to content

Commit 415ff32

Browse files
fix: color picker dark theme (#1057)
* Removing some hard coded colors, so now they will be able to use the dark-theme as well * Removed the box-sahdow and added a border using the --uui-border-color, for the preview button --------- Co-authored-by: Niels Lyngsø <[email protected]>
1 parent 23dab5e commit 415ff32

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/uui-color-picker/lib/uui-color-picker.element.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,7 @@ export class UUIColorPickerElement extends LabelMixin('label', LitElement) {
586586
--uui-look-outline-border: #ddd;
587587
--uui-look-outline-border-hover: #aaa;
588588
font-size: 0.8rem;
589+
color: var(--uui-color-text);
589590
display: block;
590591
width: var(--uui-color-picker-width, 280px);
591592
}
@@ -597,9 +598,9 @@ export class UUIColorPickerElement extends LabelMixin('label', LitElement) {
597598
}
598599
.color-picker {
599600
width: 100%;
600-
background-color: #fff;
601+
background-color: var(--uui-color-surface);
601602
user-select: none;
602-
border: solid 1px #e4e4e7;
603+
border: solid 1px var(--uui-color-border);
603604
}
604605
.color-picker__user-input {
605606
display: flex;
@@ -641,7 +642,6 @@ export class UUIColorPickerElement extends LabelMixin('label', LitElement) {
641642
width: 100%;
642643
height: 100%;
643644
border-radius: inherit;
644-
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
645645
/* We use a custom property in lieu of currentColor because of https://bugs.webkit.org/show_bug.cgi?id=216780 */
646646
background-color: var(--preview-color);
647647
}
@@ -651,6 +651,7 @@ export class UUIColorPickerElement extends LabelMixin('label', LitElement) {
651651
}
652652
653653
.color-picker__transparent-bg {
654+
border: 1px solid var(--uui-color-border);
654655
background-image: linear-gradient(
655656
45deg,
656657
var(--uui-palette-grey) 25%,
@@ -705,7 +706,7 @@ export class UUIColorPickerElement extends LabelMixin('label', LitElement) {
705706
}
706707
707708
uui-color-swatches {
708-
border-top: solid 1px #d4d4d8;
709+
border-top: solid 1px var(--uui-color-border);
709710
padding: 0.75rem;
710711
}
711712

0 commit comments

Comments
 (0)