Skip to content

Proposal: add design tokens for font weights #21524

@eljefe223

Description

@eljefe223

Describe the feature that you would like added

We should add design tokens for font weights for fluent web components. This would add the following design tokens as part of the fluent-design-system. We still need to determine the defaulted values.

 fontWeightExtraLight
 fontWeightLight
 fontWeightNormal
 fontWeightSemiBold
 fontWeightBold
export const fontWeightExtraLight = create<string>('font-weight-extra-light').withDefault('200');
export const fontWeightLight = create<string>('font-weight-semi-light').withDefault('300');
export const fontWeightNormal = create<string>('font-weight-normal').withDefault('400');
export const fontWeightSemiBold = create<string>('font-weight-semi-bold').withDefault('500');
export const fontWeightBold = create<string>('font-weight-bold').withDefault('700');

What component or utility would this be added to

packages/web-components/src/design-tokens.ts

Some questions to ask

Do we like the concept of named variables extra-light ???, light, semi-light, normal, semi-bold, bold?
Setting a flat token (a string value) seems like the best approach since these values can be any number between 1 - 1000

Accessibility concerns

People experiencing low vision conditions may have difficulty reading text set with a font-weight value of 100 or 200, especially if the font has a low contrast color ratio. Something that can be considered when setting default values.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions