Skip to content

Commit 1697a7f

Browse files
author
Michael Jordan
authored
fix(#5931): TextField/TextArea: fix outline thickness with forced-colors: active (#5932)
fix(#5931): TextField/TextArea: fix outline thickness with forced-colors: active (#5932)
1 parent 81e672f commit 1697a7f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

packages/@adobe/spectrum-css-temp/components/commons/focus-ring.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,14 @@
4545
}
4646
}
4747
}
48+
49+
@media (forced-colors: active) {
50+
.spectrum-FocusRing,
51+
.spectrum-FocusRing-ring,
52+
.spectrum-FocusRing--quiet {
53+
--spectrum-high-contrast-focus-ring-color: xvar(--spectrum-high-contrast-focus-ring-color, Highlight);
54+
&:after {
55+
forced-color-adjust: none;
56+
}
57+
}
58+
}

packages/@adobe/spectrum-css-temp/components/textfield/skin.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,10 @@ governing permissions and limitations under the License.
180180
--spectrum-textfield-border-color-key-focus: Highlight;
181181
--spectrum-textfield-placeholder-text-color: GrayText;
182182
--spectrum-textfield-placeholder-text-color-hover: GrayText;
183+
--spectrum-high-contrast-focus-ring-color: Highlight;
183184
&.focus-ring,
184185
&:focus-visible {
185-
outline: 2px solid Highlight;
186+
outline: 2px solid var(--spectrum-high-contrast-focus-ring-color);
186187
}
187188
.spectrum-Textfield--quiet & {
188189
&.focus-ring,

0 commit comments

Comments
 (0)