Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Remove unneeded CSS prefixes and length unit symbols #12163

Closed
wants to merge 3 commits into from
Closed

Remove unneeded CSS prefixes and length unit symbols #12163

wants to merge 3 commits into from

Conversation

valtlai
Copy link
Contributor

@valtlai valtlai commented Jan 28, 2016

  • Remove -webkit- prefixes from transition and flexbox-related properties
  • Remove -webkit- prefix inside unprefixed @keyframes
  • Add missing unprefixed transforms
  • Remove px unit from 0px values

(+ Remove whitespace from end of lines)

@petetnt
Copy link
Collaborator

petetnt commented Jan 28, 2016

LGTM

@redmunds
Copy link
Contributor

@valtlait

The original email notification I received said this:

(+ Remove whitespace from end of lines and empty lines)

But message in PR now says this:

(+ Remove whitespace from end of lines)

It looks like it was edited to remove "and empty lines". But, I still see lines with only whitespace that were edited to remove whitespace in this PR. Please backout those changes and rebase into a single commit. Thanks.

In general:

Yes, please remove whitespace from the end of non-empty lines.

Please do not remove whitespace from empty lines. This is not part of the Brackets coding conventions. It's optional based on developer tastes. It doesn't do any good to remove it because the next dev might put it back. Worst of all, the change will show up as a merge conflict for the next poor soul that edits a line near that change, so it causes unnecessary pain.

Exception: whitespace on empty lines should be at correct indentation level, so it's ok to correct that. But no need to scan files for this -- just correct it in code blocks that you are editing for some other reason.

@petetnt
Copy link
Collaborator

petetnt commented Jan 28, 2016

FWIW There was discussion about this on #11998 too and @peterflynn suggested (for the code) "no-trailing-spaces": [2, { "skipBlankLines": true }] which I think makes some sense. The thing is that when no-trailing-spaces is enabled you can't really use an automatic whitespace sanitizer, without doing tons of silly diffs all over the documents. But then again CodeMirror likes to put whitespace allover the place so there's you have either to endure the manual removal of trailing spaces, let them be or just remove them all, all of which have their downsides.

@valtlai
Copy link
Contributor Author

valtlai commented Jan 28, 2016

Reverted whitespace changes for empty lines.

@redmunds
Copy link
Contributor

@valtlait Thank you!

@@ -511,8 +511,7 @@ a, img {
margin-bottom: 0;
.sprite-icon(0, 0, 13px, 13px, "images/flip-view-icons.svg");
background-origin: content-box;
-webkit-transform: translateZ(0); // forces GPU mode for better filter rendering on retina
transform: translateZ(0); // future proofing
transform: translateZ(0); // forces GPU mode for better filter rendering on retina
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note that the Linux build of Brackets Shell is sadly still based on CEF 1547 (~ Chrome 29), so you still need these prefixes (and probably others, too) according to caniuse.com

@valtlai
Copy link
Contributor Author

valtlai commented Jan 30, 2016

  • Restored -webkit- prefix to transform
  • Removed -webkit- prefix inside unprefixed @keyframes
  • Added missing unprefixed transforms

* Remove `-webkit-` prefixes from `transition` and flexbox-related properties
* Remove `-webkit-` prefix inside unprefixed `@keyframes`
* Add missing unprefixed `transform`s
* Remove `px` unit from `0px` values

(+ Remove whitespace from end of lines)
@@ -220,8 +220,8 @@ a, img {

#status-language {
border-right: 1px solid @bc-panel-border;
padding: 0px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious. Why did you removed the units from all 0s?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MiguelCastillo There’s a practice to leave off the unit from zero length values. That makes the code look slightly cleaner.

@ficristo
Copy link
Collaborator

ficristo commented Aug 3, 2016

@valtlai could you update the PR?
It LGTM but I prefer if someone else could do the last check.

@valtlai
Copy link
Contributor Author

valtlai commented Aug 3, 2016

@ficristo Updated.

@ficristo
Copy link
Collaborator

ficristo commented Aug 3, 2016

@valtlai the merge didn't end well, can you check?

…-prefixes"

This reverts commit 94ba3e1, reversing
changes made to 802243a.
@valtlai
Copy link
Contributor Author

valtlai commented Aug 4, 2016

Replaced with #12648.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants