Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29346536: Issue 4155 - Created global csscomb config (Closed)

Created:
June 15, 2016, 1:52 p.m. by juliandoucette
Modified:
Jan. 30, 2017, 10:49 a.m.
CC:
Felix Dahlke, Sebastian Noack, martin, Wladimir Palant, ppastour
Visibility:
Public.

Description

I created this .csscomb.json CSScomb is a coding style formatter for CSS. You can easily write your own configuration to make your style sheets beautiful and consistent. The main feature is sorting properties in a specific order. It was inspired by @miripiruni's PHP-based tool of the same name. This is the new JavaScript version, based on the powerful CSS parser Gonzales PE. Find more information about csscomb here: - http://csscomb.com/ - https://github.com/csscomb/csscomb.js - https://github.com/csscomb/csscomb.js/blob/dev/doc/options.md I found this tool very useful because: - I tend ignore sort-order - I tend to put brackets on the same line - I tend to copy/paste from the web and dev tools And it was really annoying to fix resulting CSS formatting issues manually. Using this tool, I simply ran `csscomb` from the cli, my editor (via atom plugin), or my build procedure (via gulp) whenever I: - pasted code - noticed errors - uploaded a review And saved myself (and my reviewer) a ton of time - allowing us to focus on the *real* CSS issues. I'm not sure whether this tool can/should replace a CSS Linter. But I do think that it is worth sharing. And it **may** be all we need as far as CSS Linting goes (if we want to keep things simple).

Patch Set 1 #

Patch Set 2 : Fixed extra spaces and display property in sort order #

Total comments: 14

Patch Set 3 : Added lines-between-rulesets, removed proprietary/unsupported css properties, grouped sort-order by… #

Total comments: 4

Patch Set 4 : Added 'flex' and removed 'box shadow' duplicates #

Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -0 lines) Patch
A csscomb.json View 1 2 3 1 chunk +171 lines, -0 lines 0 comments Download

Messages

Total messages: 18
juliandoucette
June 15, 2016, 1:52 p.m. (2016-06-15 13:52:49 UTC) #1
juliandoucette
I will create an issue in Trac for this ASAP (Trac is down). For those ...
June 15, 2016, 2:05 p.m. (2016-06-15 14:05:58 UTC) #2
juliandoucette
On 2016/06/15 14:05:58, juliandoucette wrote: > I will create an issue in Trac for this ...
June 15, 2016, 2:37 p.m. (2016-06-15 14:37:58 UTC) #3
juliandoucette
Updated reviewers based on discussion in last Frontend Developers meeting.
Sept. 15, 2016, 3:57 p.m. (2016-09-15 15:57:08 UTC) #4
Wladimir Palant
This config file is quite large, if I see it correctly csscomb doesn't support inheriting ...
Sept. 16, 2016, 8:18 a.m. (2016-09-16 08:18:20 UTC) #5
kzar
Mind removing me as a reviewer for this one? I don't think I can offer ...
Sept. 16, 2016, 10:04 a.m. (2016-09-16 10:04:35 UTC) #6
juliandoucette
On 2016/09/16 10:04:35, kzar wrote: > Mind removing me as a reviewer for this one? ...
Sept. 16, 2016, 10:51 a.m. (2016-09-16 10:51:57 UTC) #7
juliandoucette
> This config file is quite large, if I see it correctly csscomb doesn't support ...
Sept. 16, 2016, 12:23 p.m. (2016-09-16 12:23:24 UTC) #8
Thomas Greiner
https://codereview.adblockplus.org/29346536/diff/29353262/.csscomb.json File .csscomb.json (right): https://codereview.adblockplus.org/29346536/diff/29353262/.csscomb.json#newcode1 .csscomb.json:1: { I'd suggest adding "lines-between-rulesets". https://codereview.adblockplus.org/29346536/diff/29353262/.csscomb.json#newcode24 .csscomb.json:24: "sort-order": [ ...
Sept. 16, 2016, 12:47 p.m. (2016-09-16 12:47:03 UTC) #9
juliandoucette
Thank you Thomas! See comments below. https://codereview.adblockplus.org/29346536/diff/29353262/.csscomb.json File .csscomb.json (right): https://codereview.adblockplus.org/29346536/diff/29353262/.csscomb.json#newcode1 .csscomb.json:1: { On 2016/09/16 ...
Sept. 16, 2016, 4:32 p.m. (2016-09-16 16:32:27 UTC) #10
juliandoucette
See a correction and a clarification of my previous comments below. https://codereview.adblockplus.org/29346536/diff/29353262/.csscomb.json File .csscomb.json (right): ...
Sept. 16, 2016, 4:43 p.m. (2016-09-16 16:43:01 UTC) #11
Thomas Greiner
https://codereview.adblockplus.org/29346536/diff/29353262/.csscomb.json File .csscomb.json (right): https://codereview.adblockplus.org/29346536/diff/29353262/.csscomb.json#newcode24 .csscomb.json:24: "sort-order": [ On 2016/09/16 16:32:27, juliandoucette wrote: > On ...
Sept. 16, 2016, 5:39 p.m. (2016-09-16 17:39:30 UTC) #12
juliandoucette
> Regarding using a linter or a beautifier, I'd prefer educating the developer on > ...
Sept. 16, 2016, 7 p.m. (2016-09-16 19:00:51 UTC) #13
juliandoucette
- I updated the description to describe what CSSComb is and why I decided to ...
Sept. 16, 2016, 9:15 p.m. (2016-09-16 21:15:32 UTC) #14
Thomas Greiner
> If we added this config to codingtools then we would always have this tool ...
Sept. 19, 2016, 11:57 a.m. (2016-09-19 11:57:11 UTC) #15
juliandoucette
Thanks Thomas. Let's finish this review. Please comment LGTM if you want this in coding ...
Oct. 13, 2016, 12:15 p.m. (2016-10-13 12:15:16 UTC) #16
juliandoucette
Worth pointing out: - [stylelint](https://github.com/stylelint/stylelint) covers more CSS rules - [stylefmt](https://github.com/morishitter/stylefmt) supports stylelint config
Oct. 13, 2016, 2:19 p.m. (2016-10-13 14:19:06 UTC) #17
juliandoucette
Jan. 30, 2017, 10:49 a.m. (2017-01-30 10:49:38 UTC) #18
Message was sent while issue was closed.
I closed this ticket/review because:

- stylelint covers more relevant rules
- stylelint handles sass/scss better (which was not a requirement when this
ticket was created)
- csscomb seems less configurable as a linter (which is useful for CI)
- stylefmt covers formatting for stylelint
- stylelint is more actively maintained
- stylelint seems to have better editor plugins

Powered by Google App Engine
This is Rietveld