BUILD #7: CSS gap decorations linting rules#72
Draft
nujovich wants to merge 5 commits into
Draft
Conversation
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.
Owner
Author
|
All milestones complete. Ready for review when you are. |
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.
Card: https://github.com/nujovich/mint-radar/issues/7
Milestones
gap-decoration-hackrule -- detect manual gap styling patterns (border on children, pseudo-elements, background with gap) and suggest migrating to nativegap-rule-*propertiesgap-decorations-compatrule -- warn when project uses gap decorations but browserslist does not support them, suggest fallbackmint-ds auditunder "Modern CSS Opportunities"