From 535bfb43ba8d4e202cda7c566da91436363f53e0 Mon Sep 17 00:00:00 2001 From: Mike Perrotti Date: Thu, 17 Mar 2022 18:13:25 -0400 Subject: [PATCH 1/3] reverts select options colors to initial --- src/Select.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Select.tsx b/src/Select.tsx index 25708efa576..c220edb6c4f 100644 --- a/src/Select.tsx +++ b/src/Select.tsx @@ -16,6 +16,10 @@ const StyledSelect = styled.select` outline: none; width: 100%; + option { + color: initial; + } + /* colors the select input's placeholder text */ &:invalid { color: ${get('colors.fg.subtle')}; From 3a667fa8c5fc4d17870148ae2b0972e2b1174553 Mon Sep 17 00:00:00 2001 From: Mike Perrotti Date: Thu, 17 Mar 2022 18:20:03 -0400 Subject: [PATCH 2/3] adds changeset --- .changeset/healthy-cooks-draw.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/healthy-cooks-draw.md diff --git a/.changeset/healthy-cooks-draw.md b/.changeset/healthy-cooks-draw.md new file mode 100644 index 00000000000..3680cb91a6f --- /dev/null +++ b/.changeset/healthy-cooks-draw.md @@ -0,0 +1,5 @@ +--- +'@primer/react': patch +--- + +Ensures select option text has acceptable contrast in Firefox when in dark mode From b2aa0d605f54d11ed6696e105d825661d0c50c71 Mon Sep 17 00:00:00 2001 From: Mike Perrotti Date: Thu, 17 Mar 2022 19:26:44 -0400 Subject: [PATCH 3/3] rm unnecessary option style --- src/Select.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Select.tsx b/src/Select.tsx index c220edb6c4f..6469abab957 100644 --- a/src/Select.tsx +++ b/src/Select.tsx @@ -24,11 +24,6 @@ const StyledSelect = styled.select` &:invalid { color: ${get('colors.fg.subtle')}; } - - /* For Firefox: reverts color of non-placeholder options in the dropdown */ - &:invalid option:not(:first-child) { - color: ${get('colors.fg.default')}; - } ` const ArrowIndicatorSVG: React.FC<{className?: string}> = ({className}) => (