refactor: lint bare fill/stroke colors, add vars for git graph color series#37543
Merged
Conversation
The `scale-unlimited/declaration-strict-value` rule only checked properties matching `/color$/` plus `font-weight`, so SVG paint properties (`fill`, `stroke`) silently allowed literal hex values. Add `fill`/`stroke` to the rule's property list. Drop both `overrides` blocks: `**/chroma/*` and `**/codemirror/*` no longer match anything in the tree, and the live exclusions (`console.css`, `font_i18n.css`, `gitgraph.css`) move to per-file `stylelint-disable` comments with the reason inline. Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
- console.css / font_i18n.css: per-line `stylelint-disable-line` on the declarations that need them (xterm-256 palette, numeric font-weight). - gitgraph.css: extract the 16 branch flow colors into `--color-series-16-0` … `--color-series-16-15` (defined in both light and dark themes), and derive the highlight palette via `color-mix(in oklch, var(--color-series-16-N), white 15%)` instead of carrying a parallel hardcoded palette. Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
Best single-percentage fit to the original highlight colors across all 16 entries (avg ΔE 0.063 in OKLab; the original palette is hand-tuned per-color so no single recipe matches exactly). Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
- Add `--color-series-16-highlight-N` to both theme files, defined as `color-mix(in srgb, var(--color-series-16-N), white 13%)`. - Switch gitgraph.css highlight rules to use the new vars instead of inline `color-mix(...)`. - New `templates/devtest/series-colors.tmpl` showcases all 32 colors (auto-listed via `/devtest`). Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
wxiaoguang
reviewed
May 4, 2026
Member
Author
|
Turns out the highlight colors were dead code since #34948, removing. |
…le.css - Remove `.flow-group.highlight.flow-color-16-N` rules and the matching `--color-series-16-highlight-N` vars: dead since PR go-gitea#34948 (commit 70685a9) removed the JS hover handlers in July 2025. - Drop the corresponding row from the devtest page. - Revert console.css to file-level `stylelint-disable` (terminal ANSI palette is one block; per-line was noisy across 240 rows). Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
fill/stroke colors, clean stylelint overridesfill/stroke colors, add vars for git graph color series
Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
fill/stroke colors, add vars for git graph color seriesfill/stroke colors, add vars for git graph color series
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens CSS linting around color usage (now including SVG fill/stroke) and refactors the git graph color palette to be theme-driven via new CSS variables, while adjusting stylelint disablements to be more localized.
Changes:
- Extend
scale-unlimited/declaration-strict-valueto enforce strict values forfillandstroke(in addition to color props andfont-weight). - Introduce
--color-series-16-*theme variables and switch git graph flow colors from hardcoded hex to these variables. - Replace prior stylelint file overrides with in-file/per-line disable comments for
console.cssandfont_i18n.css.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| web_src/css/themes/theme-gitea-light.css | Adds --color-series-16-* variables for theme-driven 16-color series usage. |
| web_src/css/themes/theme-gitea-dark.css | Adds matching --color-series-16-* variables for dark theme. |
| web_src/css/font_i18n.css | Adds per-line stylelint disables for numeric font-weight values in @font-face rules. |
| web_src/css/features/gitgraph.css | Replaces hardcoded series colors with --color-series-16-* variables and removes highlight-specific series colors. |
| web_src/css/features/console.css | Adds a scoped file-level stylelint disable for strict-value rule due to literal xterm palette values. |
| stylelint.config.js | Updates strict-value rule to include fill/stroke and removes prior file-based overrides. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Issue stylelint/stylelint#8893 (intermittent `ConfigurationError: No configuration provided`) was fixed in 17.10.0; the workaround note can go. Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
fill/stroke colors, add vars for git graph color seriesfill/stroke colors, add vars for git graph color series
fill/stroke colors, add vars for git graph color seriesfill/stroke colors, add vars for git graph color series
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bircni
approved these changes
May 7, 2026
lunny
approved these changes
May 7, 2026
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
May 8, 2026
* origin/main: (41 commits) refactor: only reset a database table when the table's data was changed (go-gitea#37573) refactor: lint bare `fill`/`stroke` colors, add vars for git graph color series (go-gitea#37543) fix(actions): report individual step status in workflow job API response (go-gitea#37592) ci: allow `chore` type in PR title lint (go-gitea#37575) refactor: remove obsolete export (go-gitea#37579) fix: Invalid UTF-8 commit messages in JSON API responses (go-gitea#37542) fix: use consistent GetUser family functions (go-gitea#37553) fix(api): return 409 message instead of empty JSON for wrong commit id (go-gitea#37572) fix(actions): prevent panic when workflow contains null jobs (go-gitea#37570) [skip ci] Updated translations via Crowdin refactor: use modernc sqlite driver as default (go-gitea#37562) refactor(templates): remove ctxData from tmpl files, use ctx.RootData instead (go-gitea#37567) ci: increase renovate frequency and fix RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS (go-gitea#37565) fix(deps): update go dependencies (go-gitea#37541) refactor(deps): migrate from `nektos/act` fork to `gitea/runner` (go-gitea#37557) ci: lint PR titles with commitlint (go-gitea#37498) Make ServeSetHeaders default to download attachment if filename exists (go-gitea#37552) fix(actions): validate workflow param to prevent 500 error (go-gitea#37546) Fix various problems (go-gitea#37547) docs: fix 4 typos in CHANGELOG.md (go-gitea#37549) ... # Conflicts: # templates/repo/actions/runs_list.tmpl # templates/repo/issue/view_content/pull_merge_box.tmpl # templates/repo/pulls/status.tmpl
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
May 8, 2026
* origin/main: chore(renovate): detect Makefile tools, enable `go` bumps (go-gitea#37595) refactor: only reset a database table when the table's data was changed (go-gitea#37573) refactor: lint bare `fill`/`stroke` colors, add vars for git graph color series (go-gitea#37543) fix(actions): report individual step status in workflow job API response (go-gitea#37592) ci: allow `chore` type in PR title lint (go-gitea#37575) refactor: remove obsolete export (go-gitea#37579) fix: Invalid UTF-8 commit messages in JSON API responses (go-gitea#37542) fix: use consistent GetUser family functions (go-gitea#37553) fix(api): return 409 message instead of empty JSON for wrong commit id (go-gitea#37572) fix(actions): prevent panic when workflow contains null jobs (go-gitea#37570) [skip ci] Updated translations via Crowdin # Conflicts: # services/pull/pull.go
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
May 8, 2026
* main: chore(deps): bump tool deps and pin, update `golangci-lint` (go-gitea#37574) build: update pnpm to v11 (go-gitea#37591) chore(renovate): detect Makefile tools, enable `go` bumps (go-gitea#37595) refactor: only reset a database table when the table's data was changed (go-gitea#37573) refactor: lint bare `fill`/`stroke` colors, add vars for git graph color series (go-gitea#37543) fix(actions): report individual step status in workflow job API response (go-gitea#37592) ci: allow `chore` type in PR title lint (go-gitea#37575) refactor: remove obsolete export (go-gitea#37579) fix: Invalid UTF-8 commit messages in JSON API responses (go-gitea#37542) fix: use consistent GetUser family functions (go-gitea#37553) fix(api): return 409 message instead of empty JSON for wrong commit id (go-gitea#37572) fix(actions): prevent panic when workflow contains null jobs (go-gitea#37570) [skip ci] Updated translations via Crowdin refactor: use modernc sqlite driver as default (go-gitea#37562) refactor(templates): remove ctxData from tmpl files, use ctx.RootData instead (go-gitea#37567) ci: increase renovate frequency and fix RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS (go-gitea#37565) # Conflicts: # models/user/user.go
silverwind
added a commit
to mohammad-rj/gitea
that referenced
this pull request
May 8, 2026
* origin/main: (82 commits) build(deps): bump fast-uri from 3.1.0 to 3.1.2 (go-gitea#37616) fix: make clone URL respect public URL detection setting (go-gitea#37615) chore(deps): bump go-git/go-git/v5 to 5.19.0 (go-gitea#37608) chore(deps): update action dependencies (go-gitea#37603) fix(actions): fix blank lines after `::endgroup::` (go-gitea#37597) fix: treat email addresses case-insensitively (go-gitea#37600) fix(git): Fix smart http request scope bug (go-gitea#37583) chore(deps): update dependency go to v1.26.3 (go-gitea#37601) chore(deps): bump tool deps and pin, update `golangci-lint` (go-gitea#37574) build: update pnpm to v11 (go-gitea#37591) chore(renovate): detect Makefile tools, enable `go` bumps (go-gitea#37595) refactor: only reset a database table when the table's data was changed (go-gitea#37573) refactor: lint bare `fill`/`stroke` colors, add vars for git graph color series (go-gitea#37543) fix(actions): report individual step status in workflow job API response (go-gitea#37592) ci: allow `chore` type in PR title lint (go-gitea#37575) refactor: remove obsolete export (go-gitea#37579) fix: Invalid UTF-8 commit messages in JSON API responses (go-gitea#37542) fix: use consistent GetUser family functions (go-gitea#37553) fix(api): return 409 message instead of empty JSON for wrong commit id (go-gitea#37572) fix(actions): prevent panic when workflow contains null jobs (go-gitea#37570) ... # Conflicts: # tests/e2e/events.test.ts # tests/integration/eventsource_test.go
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scale-unlimited/declaration-strict-valuecover fill and strokeThis PR was written with the help of Claude Opus 4.7