Last active
June 28, 2017 15:46
-
-
Save kylemacey/08db8dc9dc18bebf4a42 to your computer and use it in GitHub Desktop.
Css diffs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
when using single line declaration, and a property is added later | |
#foo { width: 10px; } | |
becomes... | |
- #foo { width: 10px; } | |
+ #foo { | |
+ width: 10px; | |
+ height: 20px; | |
+ } | |
Which implies that the selector, #foo may have been changed, and that the value of height may have been touched | |
#foo { | |
width: 10px; | |
} | |
becomes... | |
#foo { | |
width: 10px; | |
+ height: 20px; | |
} | |
here, it's much more clear that only one property was added, making the code review easier to read |
FYI, there are online and command-line tools for formatting CSS. They almost always prefer multi-line.
But a caution: folks will freak out if you suggest comma-first lists, even though it's obviously better. 😄
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Completely agree fine sir! I am not a fan of single line CSS. It doesn't save much.