Skip to content

Commit

Permalink
fix(ɵcomponents/design): use correct background color for menu option…
Browse files Browse the repository at this point in the history
…s of <select> HTML element
  • Loading branch information
danielwiehl authored and Marcarrian committed Nov 15, 2023
1 parent 4c0a170 commit a2e4e14
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ <h1>HTML Element Styling</h1>
</section>
</ng-template>

<ng-template sciTab label="HTML Select">
<section class="tab-content">
<span>Default:</span>
<select>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
</section>
</ng-template>

<ng-template sciTab label="HTML Link">
<section class="tab-content">
<span>Link:</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
align-items: center;
padding: .5em;

> input {
> input, > select {
@include sci-design.style-input-field;
}

Expand Down
10 changes: 10 additions & 0 deletions projects/scion/components.internal/design/_styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
padding: .5em;
transition: border-color ease-in-out .15s, color ease-in-out .15s;
background-color: var(--sci-color-background-input);
color: var(--sci-color-text);
appearance: auto;

&:focus-within:not(:disabled):not(:has(input:disabled)):not(:has(select:disabled)) {
Expand All @@ -92,6 +93,15 @@
&:read-only {
color: var(--sci-color-text-subtle);
}

> option {
background-color: var(--sci-color-background-elevation);
color: var(--sci-color-text);

&:hover {
background-color: var(--sci-color-background-elevation-hover);
}
}
}

/**
Expand Down

0 comments on commit a2e4e14

Please sign in to comment.