Skip to content

Commit b8d3143

Browse files
committed
docs(theme-tokens): INV15 scopes to tooltip content and to themes whose four source colours parse
1 parent d587f48 commit b8d3143

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎docs/architecture/theme-tokens.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,14 @@ then have contradictory winners.
237237
`#445564`, has the hue and chroma of `--color-icon-secondary` (`#4E606F`)
238238
and is the smallest drop in CIE L* that meets 4.5:1 on every default tint.
239239
The lowest pair is `--color-background-gray` over the page body (4.52:1).
240-
- **INV15 — Text on the inverted surface has its own roles.** Text and icons
241-
colored by the primary, secondary or accent tokens on
242-
`--color-background-inverted` (a tooltip) take three roles:
240+
- **INV15 — Text on the inverted surface has its own roles.** Tooltip content
241+
colored by the primary, secondary or accent tokens takes three roles for
242+
text on `--color-background-inverted`:
243243
`--color-text-primary-inverted`, `--color-text-secondary-inverted` and
244244
`--color-text-accent-inverted`. A theme that sets them keeps its values. A
245245
theme that sets none of them, but sets a colour they are computed from (its
246-
surface, inverted surface, secondary text or accent) in hex or `rgb()`, gets
247-
values computed
246+
surface, inverted surface, secondary text or accent), and whose four
247+
source colours are all hex or `rgb()`, gets values computed
248248
when the theme is generated: primary is the theme's surface colour, else
249249
white or black, whichever meets 4.5:1 on the inverted surface; secondary and
250250
accent are the theme's secondary text and accent at the nearest lightness

‎packages/core/src/Tooltip/useTooltip.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ const styles = stylex.create({
105105
// Position-based margin styles
106106
// Content wrapper for padding
107107
content: {
108-
// Token-colored content, such as `Text`, takes the theme's text roles
109-
// for the inverted surface, which read on it.
108+
// Content colored by the primary, secondary or accent tokens, such as
109+
// `Text`, takes the theme's text roles for the inverted surface.
110110
[colorVars['--color-text-primary']]:
111111
colorVars['--color-text-primary-inverted'],
112112
[colorVars['--color-text-secondary']]:

0 commit comments

Comments
 (0)