Skip to content

Commit

Permalink
fix css module comments
Browse files Browse the repository at this point in the history
  • Loading branch information
randall-krauskopf authored Oct 30, 2024
1 parent f103d90 commit 5b65d42
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions packages/react/src/Select/Select.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,29 @@
font-size: inherit;
color: currentColor;

/* Firefox hacks: */

/* 1. Makes Firefox's native dropdown menu's background match the theme.
background-color should be 'transparent', but Firefox uses the background-color on
<select> to determine the background color used for the dropdown menu.
2. Adds 1px margins to the <select> so the background color doesn't hide the focus outline created with an inset box-shadow.
*/
/* Firefox hacks:
* 1. Makes Firefox's native dropdown menu's background match the theme.
* background-color should be 'transparent', but Firefox uses the background-color on
* <select> to determine the background color used for the dropdown menu.
* 2. Adds 1px margins to the <select> so the background color doesn't hide the focus outline created with an inset box-shadow.
*/
background-color: inherit;
border: 0;
border-radius: inherit;
outline: none;
appearance: none;

/* 2. Prevents visible overlap of partially transparent background colors.
'colors.input.disabledBg' happens to be partially transparent in light mode, so we use a
transparent background-color on a disabled <select>. */
* 'colors.input.disabledBg' happens to be partially transparent in light mode, so we use a
* transparent background-color on a disabled <select>.
*/
&:disabled {
background-color: transparent;
}

/* 3. Maintain dark bg color in Firefox on Windows high-contrast mode
Firefox makes the <select>'s background color white when setting 'background-color: transparent;' */
* Firefox makes the <select>'s background color white when setting 'background-color: transparent;'
*/
@media screen and (forced-colors: active) {
&:disabled {
background-color: -moz-combobox;
Expand Down

0 comments on commit 5b65d42

Please sign in to comment.