WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 13 months ago

#35358 closed enhancement (fixed)

Values of 0 doesn't need to have units specified in .scss file

Reported by: MatheusFD Owned by: swissspidy
Milestone: 4.8 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

If we are using .scss files to simplify our CSS writing, let's improve this to write less and do more!

The patch just removes the unit px from the .scss file.

Attachments (1)

35358.patch (523 bytes) - added by MatheusFD 2 years ago.
Just remove the px unit from .scss file

Download all attachments as: .zip

Change History (6)

@MatheusFD
2 years ago

Just remove the px unit from .scss file

#1 @MatheusFD
2 years ago

http://i.imgur.com/m85yfo9.png

We don't need to use -webkit- too for box-shadow. IE8 doesn't offers support even with engine. Either for Opera Mini

#2 @MatheusFD
2 years ago

  • Keywords has-patch 2nd-opinion added

#3 @swissspidy
16 months ago

  • Keywords 2nd-opinion removed
  • Milestone changed from Awaiting Review to 4.8
  • Owner set to swissspidy
  • Status changed from new to accepted

We can easily apply 35358.patch. Output is the same because of autoprefixer. Example:

.media-selection .attachment.selection.details .thumbnail {
  -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 3px #096484;
  box-shadow: 0 0 0 1px #fff, 0 0 0 3px #096484;
}

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


13 months ago

#5 @swissspidy
13 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 40576:

Administration: Remove unit and prefixed version from a CSS declaration.

The prefixed version gets added by Autoprefixer already.

Props MatheusFD.
Fixes #35358.

Note: See TracTickets for help on using tickets.