fix: add bg/fg aliases for theme color resolution (#6546)
* fix: add bg/fg aliases for theme color resolution Themes define bg/fg but the template system expects background/foreground. The fallback chain only checked color0/color7, leaving background/foreground empty for themes using bg/fg naming. * Complete legacy theme palette compatibility --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
co-authored by
David Heinemeier Hansson
parent
fd02c26230
commit
caeffdc27b
@@ -66,6 +66,21 @@ shell palette is loaded from:
|
||||
serves as ANSI `color8`
|
||||
- `urgent` / `red` / `color1`
|
||||
|
||||
Themes and user templates using the legacy short names remain supported.
|
||||
Canonical names take precedence when both forms are defined, and resolved
|
||||
canonical values are also exposed through their legacy names:
|
||||
|
||||
| Canonical | Legacy |
|
||||
|-----------|--------|
|
||||
| `background` | `bg` |
|
||||
| `dark_background` | `dark_bg` |
|
||||
| `darker_background` | `darker_bg` |
|
||||
| `lighter_background` | `lighter_bg` |
|
||||
| `foreground` | `fg` |
|
||||
| `dark_foreground` | `dark_fg` |
|
||||
| `light_foreground` | `light_fg` |
|
||||
| `bright_foreground` | `bright_fg` |
|
||||
|
||||
The neutral ramp is centered on `background -> bright_foreground`. Dark themes
|
||||
should read from darkest to lightest; light themes should read from lightest to
|
||||
darkest. Terminal and editor cursors use `bright_foreground`; there is no
|
||||
|
||||
Reference in New Issue
Block a user