Skip to content
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
4 changes: 2 additions & 2 deletions packages/semantic-tokens/etc/semantic-tokens.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ export const ctrlFabShadowRestKey = "var(--smtc-ctrl-fab-shadow-rest-key)";
export const ctrlFabShadowRestKeyRaw = "--smtc-ctrl-fab-shadow-rest-key";

// @public (undocumented)
export const ctrlFocusInnerStroke = "var(--smtc-ctrl-focus-inner-stroke)";
export const ctrlFocusInnerStroke = "var(--smtc-ctrl-focus-inner-stroke, var(--colorStrokeFocus2))";

// @public (undocumented)
export const ctrlFocusInnerStrokeRaw = "--smtc-ctrl-focus-inner-stroke";
Expand All @@ -1565,7 +1565,7 @@ export const ctrlFocusInnerStrokeWidth = "var(--smtc-ctrl-focus-inner-stroke-wid
export const ctrlFocusInnerStrokeWidthRaw = "--smtc-ctrl-focus-inner-stroke-width";

// @public (undocumented)
export const ctrlFocusOuterStroke = "var(--smtc-ctrl-focus-outer-stroke, var(--smtc-background-ctrl-brand-rest, var(--colorStrokeFocus2)))";
export const ctrlFocusOuterStroke = "var(--smtc-ctrl-focus-outer-stroke, var(--smtc-background-ctrl-brand-rest, var(--colorTransparentStroke)))";

// @public (undocumented)
export const ctrlFocusOuterStrokeRaw = "--smtc-ctrl-focus-outer-stroke";
Expand Down
6 changes: 1 addition & 5 deletions packages/semantic-tokens/scripts/tokenGen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const isInvalidToken = (token: string) => {
return true;
}
// Blacklist for non-valid tokens
if (token.includes('Figmaonly') || token.startsWith('null')) {
if (token.includes('Figmaonly') || token.toLocaleLowerCase().startsWith('null')) {
// Superfluous tokens - SKIP
return true;
}
Expand Down Expand Up @@ -142,10 +142,6 @@ const getResolvedToken = (token: string, tokenData: Token, tokenNameRaw: string)
)}, ${escapeMixedInlineToken(fluentFallback)}))`;
}

if (fluentFallback && tokenData.nullable) {
return `var(${escapeInlineToken(tokenNameRaw)}, var(${escapeMixedInlineToken(fluentFallback)}}, unset))`;
}

if (fluentFallback) {
return `var(${escapeInlineToken(tokenNameRaw)}, ${escapeMixedInlineToken(fluentFallback)})`;
}
Expand Down
6 changes: 3 additions & 3 deletions packages/semantic-tokens/src/components/focus/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// THIS FILE IS GENERATED AS PART OF THE BUILD PROCESS. DO NOT MANUALLY MODIFY THIS FILE
import { strokeWidthDefaultRaw, backgroundCtrlBrandRestRaw } from '../../control/variables';
import { colorStrokeFocus2 } from '../../legacy/tokens';
import { colorStrokeFocus2, colorTransparentStroke } from '../../legacy/tokens';
import {
ctrlFocusInnerStrokeWidthRaw,
ctrlFocusInnerStrokeRaw,
Expand All @@ -9,6 +9,6 @@ import {
} from './variables';

export const ctrlFocusInnerStrokeWidth = `var(${ctrlFocusInnerStrokeWidthRaw}, var(${strokeWidthDefaultRaw}))`;
export const ctrlFocusInnerStroke = `var(${ctrlFocusInnerStrokeRaw})`;
export const ctrlFocusInnerStroke = `var(${ctrlFocusInnerStrokeRaw}, ${colorStrokeFocus2})`;
export const ctrlFocusOuterStrokeWidth = `var(${ctrlFocusOuterStrokeWidthRaw})`;
export const ctrlFocusOuterStroke = `var(${ctrlFocusOuterStrokeRaw}, var(${backgroundCtrlBrandRestRaw}, ${colorStrokeFocus2}))`;
export const ctrlFocusOuterStroke = `var(${ctrlFocusOuterStrokeRaw}, var(${backgroundCtrlBrandRestRaw}, ${colorTransparentStroke}))`;
3 changes: 2 additions & 1 deletion packages/semantic-tokens/src/fluentOverrides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export type FluentOverrides = Record<string, FluentOverrideValue | null>;

export const fluentOverrides: FluentOverrides = {
cornerZero: { f2Token: 'borderRadiusNone' },
ctrlFocusOuterStroke: { f2Token: 'colorStrokeFocus2' },
ctrlFocusInnerStroke: { f2Token: 'colorStrokeFocus2' },
ctrlFocusOuterStroke: { f2Token: 'colorTransparentStroke' },
ctrlLinkForegroundBrandHover: { f2Token: 'colorBrandForegroundLinkHover' },
ctrlLinkForegroundBrandPressed: { f2Token: 'colorBrandForegroundLinkPressed' },
ctrlLinkForegroundBrandRest: { f2Token: 'colorBrandForegroundLink' },
Expand Down
5 changes: 5 additions & 0 deletions packages/semantic-tokens/src/legacy/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ export const borderRadiusNone = 'var(--borderRadiusNone)';
* @public
*/
export const colorStrokeFocus2 = 'var(--colorStrokeFocus2)';
/**
* CSS custom property value for the {@link @fluentui/tokens#colorTransparentStroke | `colorTransparentStroke`} design token.
* @public
*/
export const colorTransparentStroke = 'var(--colorTransparentStroke)';
/**
* CSS custom property value for the {@link @fluentui/tokens#colorBrandForegroundLinkHover | `colorBrandForegroundLinkHover`} design token.
* @public
Expand Down