Skip to content

docs: show color swatches next to README variables - #61

Merged
Fivell merged 3 commits into
masterfrom
docs/readme-color-swatches
Oct 8, 2026
Merged

Fivell merged 3 commits into
masterfrom
docs/readme-color-swatches

Conversation

@Fivell

@Fivell Fivell commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Adds a small 16x16 solid-color swatch image next to every literal hex default in the README SCSS variable reference tables, so a reader sees each variable's actual color inline instead of only the hex code.

  • Swatches are now repo-local SVG files under docs/swatches/<hex>.svg, referenced by relative path. No external/third-party CDN dependency — GitHub renders the committed SVGs natively in the README.
  • One 16x16 solid-fill SVG per distinct hex (38 files) backs the 47 inline references.
  • Change is strictly additive and mechanical: swatches are placed next to existing hex text; column alignment preserved.
  • Non-hex defaults (SCSS functions like darken(...), var(--aa-...) refs, variable aliases, null/none, px/size values) are left unchanged — no swatch invented.
  • test/css_check.rb strips ![...](...) image markdown before parsing, so relative swatch links are ignored by the README/declaration cross-check; rake css passes.

Fivell added 3 commits October 8, 2026 10:31
Add a 16x16 solid-color swatch image (via singlecolorimage.com) next to
every literal hex default in the SCSS variable reference tables, so readers
see each variable's actual color inline. Change is additive only: swatches
are added beside existing hex text; non-hex defaults (SCSS functions, var()
references, variable aliases, null/none, sizes) are left unchanged.
The inline swatch image markdown added next to each hex value contains
slashes in its URL, which broke the light/dark `split("/")` in the
README-vs-stylesheet checker. Strip the `![alt](url)` images before
splitting so the backticked hex values are read correctly.
Replace the external singlecolorimage.com swatch images with small
committed SVG files referenced by relative path, so the README renders
its color swatches natively on GitHub with no dependency on a third-party
CDN. One 16x16 solid-fill SVG per distinct hex lives under docs/swatches/.
@Fivell
Fivell merged commit 50b3e30 into master Oct 8, 2026
2 checks passed
@Fivell
Fivell deleted the docs/readme-color-swatches branch October 8, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant