-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Style #266
Comments
I agree. Code style checking is probably something we should be doing as part of the build for both JS and Sass/CSS. My personal preference for Sass is that we do use alignment. It's clean and relatively easy to read. @surma @sgomes @brianhall any opinions? I haven't used gulp-csslint heavily before, but if someone has experience with it and would be interested in playing around a PR, I certainly wouldn't turn that down. |
I'm usually against aligning all values to a given column, for a few reasons:
That said, I don't feel so strongly about this that I'd go against the majority. |
I don't care either way. But I'd rather not align just to save us all the time of having to align if we don't care to find tooling that will do it. csslint is also more for the technological output over the style. i.e. Making sure you have vendor prefix and in the right order. Something else would be needed for exact style of the scss. |
I started exploring https://github.com/brigade/scss-lint this evening and so far really like it. It has task runner and text editor plugins for most setups readily available and as one might expect, a config file. As we haven't been running our styles against any linters, we would probably want to start off with most options switched off and gradually turn them on as we improve. One possible config to start us off (if we like the tool):
|
As a suggestion for CSS code style to follow some css guides especially 'Declaration order' by Mark Otto. The CSS becomes more readable :) |
Great reference @yuyokk. Thanks. |
Superseded by the linting setup in #4464. |
In some places of the Scss we have no alignment for colons, while in other places there is alignment.
Is there any set style for the projects code?
Further, we should setup tooling to check the code style through a gulp task. Maybe even using something like gulp-csslint to verify the output CSS adhears to some set rules.
The text was updated successfully, but these errors were encountered: