Regenerate README hero with new bounding-box logo #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: checks | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| token-purity: | |
| name: Token-driven (no hardcoded colors) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Fail on hardcoded hex colors in lib/components.css | |
| run: | | |
| # Components must reference var(--token), never raw hex colors. | |
| # Strip CSS comments first (preserving line numbers) so a hex mentioned | |
| # in a comment doesn't false-positive the check. | |
| stripped=$(perl -0777 -pe 's{/\*.*?\*/}{ (my $c=$&) =~ s/[^\n]/ /g; $c }ges' lib/components.css) | |
| if printf '%s' "$stripped" | grep -nEi '#[0-9a-f]{6}\b|#[0-9a-f]{3}\b'; then | |
| echo "::error::Hardcoded hex color(s) found above in lib/components.css (comments excluded). Use a var(--token) from lib/globals.css instead." | |
| exit 1 | |
| fi | |
| echo "OK — lib/components.css is fully token-driven." |