Repository navigation
Conversation
|
@0Miles is attempting to deploy a commit to the Aoyue Team on Vercel. A member of the Team first needs to authorize it. |
The validator's existing TODO-marked workaround for math functions only checked the error fragment (error.css) for min(/max(/clamp( substrings. Some mismatches surface only a sub-token (e.g. right: max(0px, 1rem) reports the bare 0px arg), so the suppression missed valid usages and users saw false positives. - validate-css.ts: check FULL value text in addition to error.css - Extended math-fn list to all CSS Values 4 functions: calc, min, max, clamp, sin, cos, tan, asin, acos, atan, atan2, exp, log, pow, sqrt, hypot, abs, sign, round, mod, rem - 16 validator test cases (min/max/clamp/calc/oklch/rotate/ aspect-ratio/contain/container-type valid; truly invalid still errors) + 7 eslint-plugin RuleTester cases including right:max(), font-size:clamp(calc()), aspect:16/9 Scope: master-co#338 was originally tagged in the same umbrella but it's a separate feature (recommended-syntax warnings, new lint rules) — see PR master-co#428. Closes master-co#405 Closes master-co#323 Closes master-co#331
0Miles
force-pushed
the
fix/eslint-validator-min-max-clamp
branch
from
April 30, 2026 19:02
a0a7eef to
c04aa46
Compare
Contributor
Author
|
Retracting for further design verification. The fix is an extension of the existing math-fn suppression hack (broader scope, full value text scan), but issue #331 originally only included a screenshot — no repro string — so my test cases approximated the symptom. Before re-submitting I want to: (a) get a concrete #331 repro from the reporter or upstream, (b) decide whether the proper fix is a deeper css-tree spec-data update vs continuing the suppression-list approach. Code is preserved on branch |
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.
Closes #405, #323, #331.
Summary
The validator's existing TODO-marked workaround for math functions only checked the error fragment (`error.css`) for `min(`/`max(`/`clamp(` substrings. Some mismatches surface only a sub-token (e.g. `right: max(0px, 1rem)` reports the bare `0px` arg), so the suppression missed valid usages and the user saw false positives.
Changes
rightproperty #323), `font-size:clamp(1rem,calc(2vw+1rem),3rem)`, `aspect:16/9`, `rotate:45deg`Scope note
`#338` was originally tagged in the same umbrella but it's a separate feature (recommended-syntax warnings, new lint rules), not a validator suppression issue. Shipped separately as PR #420 (feat/338-eslint-recommended-syntax).
Testing