Skip to content

BUILD #7: CSS gap decorations linting rules#72

Draft
nujovich wants to merge 5 commits into
mainfrom
hermes/build/mint-css-gap-decorations
Draft

BUILD #7: CSS gap decorations linting rules#72
nujovich wants to merge 5 commits into
mainfrom
hermes/build/mint-css-gap-decorations

Conversation

@nujovich

@nujovich nujovich commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Card: https://github.com/nujovich/mint-radar/issues/7

Milestones

  • Add gap-decoration-hack rule -- detect manual gap styling patterns (border on children, pseudo-elements, background with gap) and suggest migrating to native gap-rule-* properties
  • Add gap-decorations-compat rule -- warn when project uses gap decorations but browserslist does not support them, suggest fallback
  • Add adoption estimation report -- audit how many project stylesheets use hacks that gap decorations would replace, output in mint-ds audit under "Modern CSS Opportunities"

Hermes BUILD added 5 commits June 19, 2026 18:28
Add static CSS linting for gap decoration hacks:
- lib/css-lint-rules.mjs: detects border-as-gap-line,
  pseudo-element-gap-decoration, and background-with-gap patterns
- bin/mint-ds.mjs: add `mint-ds lint <dir>` subcommand
- Includes 25 unit tests covering all patterns

Milestone 1 of #7: CSS gap decorations linting rules
Milestone 2 of BUILD #7. Adds lintGapDecorationsCompat() that detects
native gap-rule-* property usage and warns when the project's browserslist
includes browsers that do not support CSS gap decorations (Chrome < 149,
Firefox < 132, Safari, etc.). Wires into lintCss() aggregator. 10 new tests.
.getUnsupportedBrowsers() used bare require() which fails silently in
.mjs ESM context. Switch to createRequire from node:module for proper
compatibility. Verified with 10 ad-hoc checks + 35 suite tests.
Add lintGapDecorationAdoption() to css-lint-rules.mjs: aggregates the
gap-decoration hacks detected by lintGapDecorationHacks into a 'Modern CSS
Opportunities' report (stylesheets scanned / with hacks, total hacks,
breakdown by pattern). Wire the report into 'mint-ds lint', printed after
findings. 3 new tests.
@nujovich

nujovich commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

All milestones complete. Ready for review when you are.

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