Skip to content

New Rule: Require specific font size units #73

Closed
@nasty23-star

Description

@nasty23-star

Environment

Rule details
Flag the use of px

What type of rule is this?
Warns about a potential problem

Example code
.card {
font-size: 12px;
}

Participation

I am willing to submit a pull request to implement this rule.
Additional comments
Needing !important indicates there may be a larger underlying issue.

What problem do you want to solve?

Rem and em are more accessibility-friendly than px.

What do you think is the correct solution?

The option to enable accessibility mode and warn about usage of px.

Participation

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

Additional comments

I think it's very useful for improving accessibility.
https://www.a11y-collective.com/blog/what-is-rem-in-css/

Metadata

Metadata

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