Repository navigation
Floor lint: reject sizes between the 10px scanning size and the 11px label floor - #770
Merged
Merged
Conversation
…label floor no-sub-floor-text only enforced a 10px floor, so text-[10.5px] and text-[0.75rem] (the 10.5px that text-xs resolves to on the 14px root) still passed. Below 11px the design scale has one size, 10px, so the rule now rejects anything under 11px other than exactly 10px. That closes the gap without role awareness: every current 10px use is a scanning glyph or header strip and still passes. Also reads units case-insensitively, accepts a + sign and exponents, and converts pt/pc/in/cm/mm/Q and % alongside px/rem/em.
Detection eval report
Corpus coverage (gated)
Regression (gated)
Acknowledged positives:
Frontier (reported — truth-labeled hard cases)recall 92% (11/12)
Benign hard-negatives (gated — false-positive precision)false positives 1/22 (5%)
Evasion robustness (reported)
Release injection (gated — payload spliced into an existing module)
Updated by CI for this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
staged-publish-review | f267e04 | Commit Preview URL Branch Preview URL |
Oct 09 2026, 05:31 PM |
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.
Follow-up to #767.
Why
#767 moved every
text-xstotext-[12px]and madedesign-local/no-sub-floor-textflagtext-xs. The rule still only enforced a 10px minimum, sotext-[10.5px]andtext-[0.75rem]passed. Both are the same 10.5px thattext-xsresolves to on the 14px root.docs/design.mdhas three small sizes:Under 11px, only 10px has a role. Anything else under 11px is off the scale.
What changes
src/still passes: the disclosure glyphs, the DiffView header strip and the SeverityBar legend.[font-size:10.5PX]as a real font size.+sign and exponents are accepted.%and the absolute units (pt,pc,in,cm,mm,Q) are converted along with px, rem and em. rem, em and % are taken at 14px.text-[10.5px],text-[0.75rem],text-[0.75em],text-[.75rem],[font-size:10.5PX],!with a variant,!after the bracket,pt,%, signed values and exponents.sm:,!and uppercase-unit properties at 10px, plus 7.5pt, 0.7857rem, 11.5px, 0.875rem andtext-sm.Verification
pnpm run verify:quickpasses.test/oxlint-design-tokens.test.mjs: 6/6.src/with the repo config, so no source changes were needed.Limits
These are not checked:
calc(),clamp(),var(),text-(length:--x)and viewport unitsx-small[font:…]shorthandstyle={{ fontSize }}(no uses insrc/today)emand%assume a 14px parent. Whether a 10px string is really a glyph is still left to review.Docs
The floor lint note in
docs/design.mdand the rule description indocs/tooling.mdare updated.