[bug] get_computed_styles shows text colour as hex even when bound to a variable #13

Closed
opened 2026-10-25 03:02:08 +00:00 by masi · 0 comments
Owner

Expected: a text layer whose colour was set with update_styles {color:"var(--text)"} or bind_variable {field:"text-color"} reports color: "var(--text)", the way fills report backgroundColor: "var(--accent)".
Actual: get_computed_styles returns the resolved hex (#cdd6f4) for text, so a qa agent flags it as a literal colour.
Repro: set_variables {text:"#cdd6f4"}; write_html a text; update_styles {color:"var(--text)"}; bind_variable {field:"text-color", variable:"text"}; get_computed_styles → color "#cdd6f4".
Workaround: none visible; can't tell from the API whether the binding took.
Impact: false "hex colour" findings in qa and lint reviews.


Filed from PaperCraft 0.7.2 (macos).

**Expected:** a text layer whose colour was set with `update_styles {color:"var(--text)"}` or `bind_variable {field:"text-color"}` reports `color: "var(--text)"`, the way fills report `backgroundColor: "var(--accent)"`. **Actual:** `get_computed_styles` returns the resolved hex (`#cdd6f4`) for text, so a qa agent flags it as a literal colour. **Repro:** set_variables {text:"#cdd6f4"}; write_html a text; update_styles {color:"var(--text)"}; bind_variable {field:"text-color", variable:"text"}; get_computed_styles → color "#cdd6f4". **Workaround:** none visible; can't tell from the API whether the binding took. **Impact:** false "hex colour" findings in qa and lint reviews. --- Filed from PaperCraft 0.7.2 (macos).
masi closed this issue 2026-10-25 03:08:22 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: masi/papercraft#13