AbsaOSS / AbsaOSS/cps-shared-ui

Refactor color token structure: separate internal vs public tokens

未關閉
#542 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
9
分支
6
平均合併
23 小時 46 分鐘
30 天內合併 PR
5

描述

## Problem

The current color token architecture mixes internal palette values with public-facing semantic tokens, making it unclear which tokens are meant for internal theming and which should be consumed by host apps.

## Proposal

Establish a clear two-layer token structure:

1. **Internal palette files** — define raw color values per theme:
- `_colors-light.scss` — light theme palette
- `_colors-dark.scss` — dark theme palette

2. **Public token file** — `_colors.scss` exposes named semantic tokens that reference the internal palette. These are the only tokens consumer apps should use.

## Why

- Prevents host apps from depending on internal color values that may change between themes
- Makes it obvious which tokens are part of the public API
- Simplifies adding new themes in the future (just add a new palette file)
- Reduces confusion during code review and onboarding

## Out of scope

This issue is about restructuring and documenting the token layers — not changing any visual output. All resolved color values should remain the same.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。