Skip to content

fix: reporting font-size unit with percentage in line-height#466

Open
Tanujkanti4441 wants to merge 1 commit into
eslint:mainfrom
Tanujkanti4441:fix-percent-unit
Open

fix: reporting font-size unit with percentage in line-height#466
Tanujkanti4441 wants to merge 1 commit into
eslint:mainfrom
Tanujkanti4441:fix-percent-unit

Conversation

@Tanujkanti4441
Copy link
Copy Markdown
Contributor

Prerequisites checklist

AI acknowledgment

  • I did not use AI to generate this PR.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

What is the purpose of this pull request?

In relative-font-units this PR fixes the reporting of font size with the correct unit when line-height is used with a percentage, such as:

/* eslint css/relative-font-units: ["error", { allowUnits: ["rem"] }] */

a {
    font: 1rem/120% Arial, sans-serif;
 }

Right now, the rule is reporting this.

What changes did you make? (Give an overview)

Added a condition to check whether the percentage is used with font-size or line-height.

Related Issues

Is there anything you'd like reviewers to focus on?

@github-project-automation github-project-automation Bot moved this to Needs Triage in Triage May 30, 2026
@eslint-github-bot eslint-github-bot Bot added the bug Something isn't working label May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

1 participant