Skip to content

fix(lint): accept final font-family descriptors without semicolons - #6085

Open
AksharP5 wants to merge 1 commit into
heygen-com:mainfrom
AksharP5:fix/lint-final-font-family
Open

AksharP5 wants to merge 1 commit into
heygen-com:mainfrom
AksharP5:fix/lint-final-font-family

Conversation

@AksharP5

Copy link
Copy Markdown
Contributor

What

Valid custom-font CSS no longer fails lint when an unquoted font-family is the final @font-face descriptor and omits its optional semicolon.

Why

The declaration matcher includes the closing brace in the family name. A declared ProjectFont becomes projectfont}, producing a blocking font_family_without_font_face error.

Same input through the real HTML linter:

CSS declaration Before After
@font-face{src:local('DejaVu Sans');font-family:ProjectFont} 1 error; strict-render gate blocks 0 errors; gate permits
Same declaration with a final semicolon 0 errors 0 errors
Quoted family, no final semicolon 0 errors 0 errors
No declaration 1 error 1 error

Chrome 152 CSSOM accepts the semicolon-free declaration as ProjectFont. The issue contains a complete, asset-free reproduction; this comparison exercises lint and the strict-render decision, not a full video render.

Related work

Fixes #6083.

#1538 strips braces from CSS comments; #2538 handles !important. Closed #2778 does not change this declaration extractor.

How

Stop the existing family-value matcher at }. Add regressions for single-word and multiword names and document the accepted syntax.

Test plan

  • Two new regressions fail on the base implementation.
  • Font rules and project-lint suites: 100 passed.
  • Lint package build and TypeScript check passed.
  • Real linter/strict-gate before/after and browser CSSOM inspected.
  • Changed TypeScript passes oxlint and oxfmt; diff whitespace check passes.
  • Documentation updated; comment checks run before push.

Validated on main 10c724bf5, Linux x86_64, Node 26.11.1 and preinstalled Bun 1.4.1 (repository pins 1.4.4). Full workspace checks are limited by missing installed inspector/AWS dependencies; Mintlify validation is unavailable because mint is absent. No new links or MDX components were added.

@mintlify

mintlify Bot commented Oct 22, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 6844a07.

Approve preview

This branch has not been deployed

No deployments
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.

lint rejects a final unquoted font-family without a semicolon

1 participant