Skip to content

Theme-agnostic Semantic Abstraction Layer for Style Aliases (Material & Simple) #1631

@kazo0

Description

@kazo0

What would you like to be added:

Implement a canonical, design-system-agnostic semantic style/resource naming layer in Uno.Themes for Material (v2) and Simple themes. This abstraction would provide developer-facing alias keys (e.g., FilledButtonStyle, FilledTextBoxStyle) derived from Material v2 vocabulary (minus the Material prefix) and mapped to each theme's best-fit native style. The goal: enable app developers to use theme-neutral style keys across both themes, improving API clarity, portability, and future extensibility.

Key points, as defined in the attached specification (spec.md):

  • Provide a 1:1 semantic alias layer for all consumer-facing Material v2 style keys (excluding internal styles/FABs/Ripple)
  • Each theme maps these semantic keys to their best-fit local style in their _Resources.xaml
  • Where no mapping exists in Simple, document the gap with TODO/XAML comments referencing the spec
  • Ensure aliases are additive: existing theme-specific keys remain valid
  • Validate by building a test page exercising all key aliases under both themes

See the full [spec.md] for detailed requirements, user stories, mapping tables, and implementation notes.

Why is this needed:

  • Reduces duplication and inconsistency between theming contracts.
  • Enables apps and libraries to "write once, theme anywhere" (Material/Simple) using consistent style keys.
  • Improves API clarity and discoverability by using Material-inspired naming.
  • Ensures gaps and mapping discrepancies are visible and tracked.
  • Non-breaking migration for all existing consumers.

For which Platform:

  • UWP
  • iOS
  • Android
  • WebAssembly
  • macOS

Anything else we need to know?

See attached full specification for mapping details, user stories, gap tracking, requirements, and success criteria.

  • File: spec.md
  • Created: 2026-03-10
  • Status: Draft
  • Scope: Material v2 and Simple themes only

Most mapping work exists already in Material; Significant completion/clarification is needed in Simple's alias layer. All changes must be non-breaking and additive.

Metadata

Metadata

Labels

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions