[bug] lint_design ignores hard-coded stroke colors that equal a variable (no warning, fix:true doesn't relink) #18
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Expected:
lint_designreports a stroke/border written as a hex that equals a color variable (like it does for fills/text), andfix: truebinds it to that variable.Actual: Strokes (
border,borderTop, etc.) with e.g.#e2e6dfwhile--border=#e2e6dfare not reported, andfix: trueleaves them hex. Afterset_variable_modeto Dark every such border stays light. Lint reports 0 issues.Repro:
set_variables {mode:"Light", variables:{"border":"#e2e6df"}}and{mode:"Dark", variables:{"border":"#26302b"}}write_html<div style="border:1px solid #e2e6df;width:100px;height:40px"></div>lint_design {fix:true}→ 0 issues, border still hex.set_variable_mode Dark→ border stays #e2e6df.Workaround: switch to the other mode,
find_nodes {filters:[{styleName:"border", styleValue:"*#e2e6df*"}]}(andborderTop/Bottom/Left/Rightseparately), thenbind_variable {field:"stroke"}in batches. Took ~1,100 nodes in one project.Impact: Dark mode looks broken (light borders/dividers) while lint says the file is clean.
Filed from PaperCraft 0.7.2 (macos).