Skip to:
Content

bbPress.org

Opened 2 years ago

Closed 2 years ago

#3106 closed defect (fixed)

Use unitless numbers for line-height values

Reported by: netweb Owned by: netweb
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: General Keywords:
Cc:

Description

Per WordPress CSS Coding Standards:

https://make.wordpress.org/core/handbook/best-practices/coding-standards/css/#values
Line height should also be unit-less, unless necessary to be defined as a specific pixel value. This is more than just a style convention, but is worth mentioning here.
More information:


http://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/
https://developer.mozilla.org/en-US/docs/Web/CSS/line-height#Prefer_unitless_numbers_for_line-height_values

FYI: The next release of stylelint-config-wordpress v11 enforces unitless numbers for line-height values for % and em values, not px

Change History (1)

#1 @netweb
2 years ago

  • Owner set to netweb
  • Resolution set to fixed
  • Status changed from new to closed

In 6408:

Build Tools: Update stylelint to 11.0.0 and use unitless values for line-height

This changeset updates stylelint to the latest version and removes % and em from line-height values per the WordPress CSS coding standards.

Fixes #3106.

Note: See TracTickets for help on using tickets.