Skip to content

Extended Tokens: Text area #34692

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

Open
wants to merge 4 commits into
base: extended-tokens
Choose a base branch
from
Open

Conversation

etudie
Copy link

@etudie etudie commented Jun 20, 2025

This pull request introduces updates to the @fluentui/react-textarea package and its related styles, focusing on transitioning from legacy tokens to semantic tokens for improved maintainability and consistency. Additionally, changes were made to semantic token definitions to support this transition. The updates enhance the styling of the Textarea component and ensure alignment with the new semantic token system.

Updates to Textarea Component Styles:

  • Replaced legacy tokens (tokens) with semantic tokens (semanticTokens) for styling properties such as borderRadius, backgroundColor, and border in useTextareaStyles.styles.ts. This ensures consistent theming across components. [1] [2] [3] [4]

  • Updated placeholder text and typography styles (e.g., fontSize, lineHeight) to use semantic tokens for better alignment with design specifications. [1] [2]

Semantic Token Enhancements:

  • Added new semantic tokens, such as _ctrlFocusOuterStrokeInteractive and _ctrlInputBackgroundRestDarker, to support the updated Textarea styles. These tokens provide fallback values for better compatibility. [1] [2]

  • Enhanced existing semantic tokens by adding fallback values sourced from legacy tokens, ensuring smooth transition and backward compatibility. For example, ctrlInputBackgroundDisabled now includes a fallback to colorNeutralBackgroundDisabled. [1] [2]

Token Definitions in semantic-tokens:

  • Updated tokens.ts to include fallback values for semantic tokens, such as ctrlInputBackgroundRest and ctrlInputStrokeRest. These changes align token definitions with the new semantic token system.

  • Imported legacy token values into tokens.ts to provide additional fallbacks for semantic tokens, ensuring consistent rendering across different themes.

@etudie etudie requested review from a team and khmakoto as code owners June 20, 2025 19:42
Copy link

Pull request demo site: URL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants