Skip to content

Commit

Permalink
fix(select): apply style to hovered selected option & expose missing …
Browse files Browse the repository at this point in the history
…tokens

Signed-off-by: astagnol <[email protected]>
  • Loading branch information
astagnol authored and dpellier committed Nov 12, 2024
1 parent 4da03d6 commit 5bb0165
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,22 @@ $select-padding-right: $select-caret-size + ($select-base-padding * 2);
opacity: 1;
}

&[data-selectable]:not(.selected):hover,
&.active:not(.selected) {
&[data-selectable]:hover,
&.active {
background-color: var(--ods-color-primary-100);
}

&.selected {
background-color: var(--ods-color-primary-200);
background-color: var(--ods-color-primary-050);

&:not([data-selectable]) {
background: var(--ods-color-neutral-200);
color: var(--ods-color-primary-000);
}

&.active {
background-color: var(--ods-color-primary-100);
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions packages/themes/src/default/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
--ods-color-form-element-text-placeholder-default: #{var.$ods-color-form-element-text-placeholder-default};
--ods-color-heading: #{var.$ods-color-heading};
--ods-color-information-000: #{var.$ods-color-information-000};
--ods-color-information-050: #{var.$ods-color-information-050};
--ods-color-information-100: #{var.$ods-color-information-100};
--ods-color-information-200: #{var.$ods-color-information-200};
--ods-color-information-300: #{var.$ods-color-information-300};
Expand All @@ -64,6 +65,7 @@
--ods-color-neutral-900: #{var.$ods-color-neutral-900};
--ods-color-new: #{var.$ods-color-new};
--ods-color-primary-000: #{var.$ods-color-primary-000};
--ods-color-primary-050: #{var.$ods-color-primary-050};
--ods-color-primary-100: #{var.$ods-color-primary-100};
--ods-color-primary-200: #{var.$ods-color-primary-200};
--ods-color-primary-300: #{var.$ods-color-primary-300};
Expand Down

0 comments on commit 5bb0165

Please sign in to comment.