-
Notifications
You must be signed in to change notification settings - Fork 0
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
Coding standards luca #8
Conversation
This reverts commit d72dc59.
This reverts commit f8fb062.
Many packages including Autoprefixer use the browserlist library which recommends defining your required browsers in package.json.
Implemented C-style comment blocks and hierarchy. Improved documentation of blocks at the same time.
Fixes pr#3.
Implemented Clean CSS to improve compression. Implemented gulp-replace to add copyright notice generated by package.json file. Extends pr#6.
Previously all in one file, now in separate files per subject. Includes moving box-sizing from _document into own file under /elements.
i changed the base branch of this PR to |
Updated the PR summary. Checking a checkbox means that we agree on the proposed change and that it can be implemented for all files. Unchecked checkboxes will wait until there is consensus. |
30987b5
to
7a0219a
Compare
Thanks for your efforts here. My feedback to the bullet points below. 1. Remove excessive white-space / blank lines. This convention follows CSS Guidelines and is fairly widely adopted (including by Bootstrap). My take is that whitespace is free so why not use it liberally. What are your particular concerns with the whitespace/blank lines? 2. Remove banners at beginning of files / replace them with Doc blocks. In the compiled (but uncompressed) CSS, these banner comments make it very clear where a new component/section starts which is very useful when reading through that file. Why do we want to remove these visual markers? 3. Remove unnecessary comments 4. Change rule order to margin > border > padding. I'm actually indifferent to the border property because, with border-box sizing, it is just presentational styling but padding should certainly be grouped with width and height. 5. Replace our custom stylelint rules with AirBnB standards. I've been using this property order for 5-6 years and find it logical and easy-to-predict.
It's endorsed by Nicolas Gallagher - https://github.com/necolas/idiomatic-css - and various other major libraries like Bootstrap, Inuit and Photon. As long as we agree on something and stick to it that's the most important thing - consistency. I'd just like to see specifics before we make changes because I've put a lot of time into setting everything up so I'd prefer not to change things just on personal preferences. Thanks! |
Thanks! |
What happened to this PR here? Why did it felt asleep after such long writings? 😴 |
@fabianmarz maybe because was too much writing?! 😂 However agree with you… how to proceed here? Who should take care of what? Can we have a resume of what left? |
We replaced our coding style standards with more relaxed industry standards by now, so I believe this issue is obsolete. |
This PR contains the changes me and @sun discussed yesterday:
Remove excessive white-space / blank lines.
Remove banners at beginning of files / replace them with Doc blocks.
Remove unnecessary comments
// Component variables
Change rule order to margin > border > padding.
Replace our custom stylelint rules with AirBnB standards with https://github.com/stylelint/stylelint-config-standard
Background info: AirBnB's own standards are currently based on csslint, but Initial Airbnb stylelint shared config
stylelint-config-airbnb
airbnb/css#23 converts them to stylelint.Notes
Details