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

focusStrokeWidth not applied on text-field and number-field #5566

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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "`focusStrokeWidth` not applied on text-field and number-field Fixes #5565",
"packageName": "@microsoft/fast-components",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
designUnit,
disabledOpacity,
focusStrokeOuter,
focusStrokeWidth,
neutralFillHover,
neutralFillInputHover,
neutralFillInputRest,
Expand Down Expand Up @@ -151,7 +152,7 @@ export const numberFieldStyles: FoundationElementTemplate<

:host(:focus-within:not([disabled])) .root {
border-color: ${focusStrokeOuter};
box-shadow: 0 0 0 1px ${focusStrokeOuter} inset;
box-shadow: 0 0 0 calc(${focusStrokeWidth} * 1px) ${focusStrokeOuter} inset;
}

:host(:hover:not([disabled])) .controls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { css, ElementStyles } from "@microsoft/fast-element";
import {
disabledCursor,
display,
ElementDefinitionContext,
focusVisible,
forcedColorsStylesheetBehavior,
FoundationElementTemplate,
Expand All @@ -18,6 +17,7 @@ import {
designUnit,
disabledOpacity,
focusStrokeOuter,
focusStrokeWidth,
neutralFillHover,
neutralFillInputHover,
neutralFillInputRest,
Expand Down Expand Up @@ -127,7 +127,7 @@ export const textFieldStyles: FoundationElementTemplate<

:host(:focus-within:not([disabled])) .root {
border-color: ${focusStrokeOuter};
box-shadow: 0 0 0 1px ${focusStrokeOuter} inset;
box-shadow: 0 0 0 calc(${focusStrokeWidth} * 1px) ${focusStrokeOuter} inset;
}

:host([appearance="filled"]) .root {
Expand Down