From 463865af91d51b6a3607a520346f30504a770499 Mon Sep 17 00:00:00 2001 From: Chris Holt Date: Mon, 22 Mar 2021 10:33:11 -0700 Subject: [PATCH 1/2] remove whitespace causing focus issue on button and anchor controls --- packages/web-components/src/styles/patterns/button.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/web-components/src/styles/patterns/button.ts b/packages/web-components/src/styles/patterns/button.ts index 8327486b77268..c3cda7783dd02 100644 --- a/packages/web-components/src/styles/patterns/button.ts +++ b/packages/web-components/src/styles/patterns/button.ts @@ -81,7 +81,7 @@ export const BaseButtonStyles: ElementStyles = css` background-color: ${neutralFillActiveBehavior.var}; } - .control: ${focusVisible} { + .control:${focusVisible} { border: calc(var(--outline-width) * 1px) solid ${neutralFocusBehavior.var}; box-shadow: 0 0 0 calc((var(--focus-outline-width) - var(--outline-width)) * 1px) ${neutralFocusBehavior.var}; } @@ -102,8 +102,10 @@ export const BaseButtonStyles: ElementStyles = css` } ::slotted(svg) { - ${/* Glyph size and margin-left is temporary - - replace when adaptive typography is figured out */ ''} width: 16px; + ${ + /* Glyph size and margin-left is temporary - + replace when adaptive typography is figured out */ '' + } width: 16px; height: 16px; } @@ -116,6 +118,7 @@ export const BaseButtonStyles: ElementStyles = css` } `.withBehaviors( neutralFillRestBehavior, + neutralFocusBehavior, neutralForegroundRestBehavior, neutralFillHoverBehavior, neutralFillActiveBehavior, From 3dee604fef70ad13be1134c00b68c00a227d8255 Mon Sep 17 00:00:00 2001 From: Chris Holt Date: Mon, 22 Mar 2021 10:34:05 -0700 Subject: [PATCH 2/2] Change files --- ...eb-components-8395d502-9c43-46d9-b776-2d623ae65016.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-web-components-8395d502-9c43-46d9-b776-2d623ae65016.json diff --git a/change/@fluentui-web-components-8395d502-9c43-46d9-b776-2d623ae65016.json b/change/@fluentui-web-components-8395d502-9c43-46d9-b776-2d623ae65016.json new file mode 100644 index 0000000000000..b60861bbe5aea --- /dev/null +++ b/change/@fluentui-web-components-8395d502-9c43-46d9-b776-2d623ae65016.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "remove whitespace causing focus issue on button and anchor controls", + "packageName": "@fluentui/web-components", + "email": "chhol@microsoft.com", + "dependentChangeType": "patch" +}