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

Add outline to focused option in Selector #1234

Merged
merged 1 commit into from
Oct 18, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions apps/storybook/src/Customization.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,15 @@ as you see fit. For instance, if you'd like to change the color of the curve of

##### Selectors

| Name | Default | Description |
| ----------------------------------------- | -------------------------------------------- | ------------------------------------ |
| `--h5w-selector-label--color` | `var(--h5w-toolbar-label--color, royalblue)` | Text color of label |
| `--h5w-selector-menu--bgColor` | `white` | Background color of menu |
| `--h5w-selector-arrowIcon--color` | `dimgray` | Color of arrow icon |
| `--h5w-selector-option-hover--bgColor` | `whitesmoke` | Background color of options on hover |
| `--h5w-selector-option-selected--bgColor` | `#eee` | Background color of selected option |
| `--h5w-selector-groupLabel--color` | `gray` | Text color of group labels in menu |
| Name | Default | Description |
| ------------------------------------------- | -------------------------------------------- | ------------------------------------ |
| `--h5w-selector-label--color` | `var(--h5w-toolbar-label--color, royalblue)` | Text color of label |
| `--h5w-selector-menu--bgColor` | `white` | Background color of menu |
| `--h5w-selector-arrowIcon--color` | `dimgray` | Color of arrow icon |
| `--h5w-selector-option-hover--bgColor` | `whitesmoke` | Background color of options on hover |
| `--h5w-selector-option-selected--bgColor` | `#eee` | Background color of selected option |
| `--h5w-selector-option-focus--outlineColor` | `gray` | Outline color of focused option |
| `--h5w-selector-groupLabel--color` | `gray` | Text color of group labels in menu |

##### Domain slider

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@
background-color: var(--h5w-selector-option-hover--bgColor, whitesmoke);
}

.option:focus {
outline: 1px solid var(--h5w-selector-option-focus--outlineColor, gray);
outline-offset: -1px;
}

.option[data-selected] {
background-color: var(--h5w-selector-option-selected--bgColor, #eee);
}