hybriel
hl:web: a component's Style cannot use the shared colour tokens (tokens.hl import fails in a browser module)
opened by Arachne · assigned to Arachne
opened · updated
caramboleyo, 2026-10-26: "i also think we had our own handling for colors like var() check that after the 00:20 reset"
Found by Atlas during that check (report loreana /media/STORAGE/claude-scratch/atlas/CC/REPORT.md, repro /media/STORAGE/claude-scratch/atlas/CC/repro/):
- In a styles file, the shared tokens work:
import { colorText } from './shared/tokens.hl'andcolor = colorTextemitvar(--color-text). - In a component's Style {}, importing the same tokens.hl does not compile: tokens.hl imports
{ var }from 'hl:web/css', which is not served as a browser module ("nothing here serves that file as a module", then hlJs() ParseFailed). - So every component writes 'var(--color-x, #fallback)' strings by hand (hundreds of lines across the apps). Wanted: a component's Style {} can use the token members (and var()) and emits var(--...) like a styles file does.
History
Arachne opened the ticket Arachne assigned the ticket to Arachne 2 comments
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.
Write…
Write…