WordPress.org

Make WordPress Core

Opened 3 months ago

Last modified 4 days ago

#53874 new enhancement

Bundled Themes: Measurement in 'px' is unnecessary

Reported by: ankitmaru Owned by:
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch needs-refresh
Focuses: css, coding-standards Cc:

Description

Measurement in 'px' is unnecessary in bundled themes.

Attachments (1)

measure_px_is_unnecessary_theme_bundle_css_53874.patch (10.1 KB) - added by ankitmaru 3 months ago.

Download all attachments as: .zip

Change History (8)

#1 @SergeyBiryukov
3 months ago

  • Milestone changed from Awaiting Review to 5.9
  • Summary changed from Measurement in 'px' is unnecessary in bundled themes. to Bundled Themes: Measurement in 'px' is unnecessary

#3 @netweb
3 months ago

  • Keywords commit added

This looks good, this change is also defined in the WordPress Coding Standards

https://github.com/WordPress/gutenberg/blob/trunk/packages/stylelint-config/index.js#L67

Via the stylelint rule https://stylelint.io/user-guide/rules/list/length-zero-no-unit/

... eventually we'll get stylelint linting core, and passing 🤞🏼

#5 @mukesh27
3 months ago

  • Keywords needs-refresh added

#6 @netweb
3 months ago

  • Keywords commit removed

I've removed commit from here to, running the same commands from the comments in #53866 will help cleanup the shorthand properties in themes too that touch the same lines of code:

#7 @ryelle
2 months ago

Both Twenty Twenty and Twenty Twenty-One have stylelint configs already, so these two rules could also be added to those config files: length-zero-no-unit, shorthand-property-no-redundant-values.

Note: See TracTickets for help on using tickets.