Skip to content

Rule Change: Make relative-font-units unit matching case-insensitive #215

@xbinaryx

Description

@xbinaryx

What rule do you want to change?

relative-font-units

What change do you want to make?

Generate fewer warnings

How do you think the change should be implemented?

A new default behavior

Example code

/* eslint css/relative-font-units: ["error"] */

.a {
    font-size: 1REM;
}

What does the rule currently do for this code?

It reports a false positive error, saying that only allowed relative units should be used, even though REM is a valid relative unit (CSS units are case-insensitive).

What will the rule do after it's changed?

It will not report an error for 1REM (or any other case variation of allowed units), correctly recognizing that CSS units are case-insensitive and REM is equivalent to rem.

Participation

  • I am willing to submit a pull request to implement this change.

Additional comments

No response

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionenhancementNew feature or request

Type

No type

Projects

Status

Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions