Skip to content

Commit 28852b6

Browse files
committed
Undo styling change following integration
1 parent c6613ee commit 28852b6

File tree

6 files changed

+20
-17
lines changed

6 files changed

+20
-17
lines changed

packages/components/src/menu-item/menu-item.styles.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
} from '@microsoft/fast-foundation';
1010
import { SystemColors } from '@microsoft/fast-web-utilities';
1111
import {
12+
accentFillFocus,
1213
accentFillRest,
1314
bodyFont,
1415
controlCornerRadius,
@@ -105,7 +106,7 @@ export const menuItemStyles: FoundationElementTemplate<
105106
}
106107
107108
:host(:${focusVisible}) {
108-
border-color: ${focusStrokeOuter};
109+
border-color: ${accentFillFocus};
109110
background: ${neutralFillStealthFocus};
110111
color: ${neutralForegroundRest};
111112
}

packages/components/src/radio/radio.styles.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,8 @@ export const radioStyles: FoundationElementTemplate<
146146
}
147147
148148
:host([aria-checked="true"]:${focusVisible}:not([disabled])) .control {
149-
box-shadow:
150-
0 0 0 2px ${fillColor},
151-
0 0 0 4px ${focusStrokeOuter};
149+
outline-offset: 2px;
150+
outline: solid calc(${focusStrokeWidth} * 1px) ${accentFillFocus};
152151
}
153152
154153
:host([disabled]) .label,

packages/components/src/styles/patterns/button.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
errorFillHover,
2323
errorFillRest,
2424
errorForegroundActive,
25+
focusStrokeOuter,
2526
focusStrokeWidth,
2627
foregroundOnAccentActive,
2728
foregroundOnAccentHover,
@@ -357,7 +358,8 @@ export const HypertextStyles = css`
357358
}
358359
359360
:host([appearance="hypertext"]) .control:${focusVisible} {
360-
border-bottom: calc(${focusStrokeWidth} * 1px) solid ${accentFillFocus};
361+
outline-color: transparent;
362+
border-bottom: calc(${focusStrokeWidth} * 1px) solid ${focusStrokeOuter};
361363
margin-bottom: calc(calc(${strokeWidth} - ${focusStrokeWidth}) * 1px);
362364
}
363365
`.withBehaviors(

packages/components/src/tab/tab.styles.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ import {
99
import { SystemColors } from '@microsoft/fast-web-utilities';
1010
import {
1111
accentFillFocus,
12-
accentForegroundActive,
13-
accentForegroundHover,
14-
accentForegroundRest,
1512
bodyFont,
1613
controlCornerRadius,
1714
designUnit,
@@ -78,19 +75,19 @@ export const tabStyles: FoundationElementTemplate<ElementStyles> = (
7875
7976
:host([aria-selected='true']) {
8077
background: ${neutralFillRest};
81-
color: ${accentForegroundRest};
78+
color: ${neutralForegroundRest};
8279
fill: currentcolor;
8380
}
8481
8582
:host([aria-selected='true']:hover) {
8683
background: ${neutralFillHover};
87-
color: ${accentForegroundHover};
84+
color: ${neutralForegroundRest};
8885
fill: currentcolor;
8986
}
9087
9188
:host([aria-selected='true']:active) {
9289
background: ${neutralFillActive};
93-
color: ${accentForegroundActive};
90+
color: ${neutralForegroundRest};
9491
fill: currentcolor;
9592
}
9693

packages/components/src/tree-item/tree-item.styles.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ import {
1212
import { SystemColors } from '@microsoft/fast-web-utilities';
1313
import { Swatch } from '../color/swatch.js';
1414
import {
15+
accentFillFocus,
1516
accentForegroundRest,
1617
baseHeightMultiplier,
1718
bodyFont,
1819
controlCornerRadius,
1920
density,
2021
designUnit,
2122
disabledOpacity,
22-
focusStrokeOuter,
2323
focusStrokeWidth,
2424
neutralFillActive,
2525
neutralFillHover,
@@ -140,8 +140,9 @@ export const treeItemStyles: FoundationElementTemplate<
140140
}
141141
142142
:host(:${focusVisible}) .positioning-region {
143-
border: ${focusStrokeOuter} calc(${strokeWidth} * 1px) solid;
144-
border-radius: calc(${controlCornerRadius} * 1px);
143+
border-color: ${accentFillFocus};
144+
box-shadow: 0 0 0 calc((${focusStrokeWidth} - ${strokeWidth}) * 1px)
145+
${accentFillFocus} inset;
145146
color: ${neutralForegroundRest};
146147
}
147148
@@ -151,6 +152,7 @@ export const treeItemStyles: FoundationElementTemplate<
151152
box-sizing: border-box;
152153
background: ${neutralFillStealthRest};
153154
border: transparent calc(${strokeWidth} * 1px) solid;
155+
border-radius: calc(${controlCornerRadius} * 1px);
154156
height: calc((${heightNumber} + 1) * 1px);
155157
}
156158
@@ -174,6 +176,7 @@ export const treeItemStyles: FoundationElementTemplate<
174176
align-items: center;
175177
white-space: nowrap;
176178
width: 100%;
179+
min-width: 0;
177180
height: calc(${heightNumber} * 1px);
178181
margin-inline-start: calc(${designUnit} * 2px + 8px);
179182
font-size: ${typeRampBaseFontSize};
@@ -276,8 +279,8 @@ export const treeItemStyles: FoundationElementTemplate<
276279
277280
:host([selected])::after {
278281
/* The background needs to be calculated based on the selected background state
279-
for this control. We currently have no way of changing that, so setting to
280-
accent-foreground-rest for the time being */
282+
for this control. We currently have no way of changing that, so setting to
283+
accent-foreground-rest for the time being */
281284
background: ${accentForegroundRest};
282285
border-radius: calc(${controlCornerRadius} * 1px);
283286
content: '';

packages/components/src/utilities/storybook/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export function getFaIcon(iconName: string, slotName: string | null): string {
4141
*/
4242
export function withTheme(story: any, context: StoryContext): HTMLElement {
4343
const theme = new DesignSystemProvider();
44+
theme.style.width = '100%';
4445
theme.accentColor = context.globals.accent ?? '#DA1A5F';
4546

4647
const background = context.globals.backgrounds?.value ?? '#252526';
@@ -53,7 +54,7 @@ export function withTheme(story: any, context: StoryContext): HTMLElement {
5354
? StandardLuminance.DarkMode
5455
: StandardLuminance.LightMode;
5556

56-
const children = story(context);
57+
const children = story();
5758
if (typeof children === 'string') {
5859
theme.insertAdjacentHTML('afterbegin', children);
5960
} else {

0 commit comments

Comments
 (0)