vajkri / css Goto Github PK
View Code? Open in Web Editor NEWCSS Standards
CSS Standards
I totally agree with this! But I think it's important to highlight that people should avoid nesting, as it qualifies their selectors, and eventually ruins the idea of OOCSS/BEM - to control the cascade. Some nesting is unavoidable / unpractical, so I'd suggest that:
:before
Example:
// Bad
.block {
.block__element {}
.block__element:hover {}
}
// Good
.block {}
.block__element {}
.block__another-element {
&:hover {}
}
.block--modifier {
.block__element {}
}
Tabs should be used for indentation, spacing for alignment only. See Lea Verou's excellent article on the subject for more information.
In general, I very much feel that code shouldn't take views or editors into account - that's why we have editors. So that every developer can format her code to fit her needs, using view settings, not indentation or line breaks. So I'd also prefer not limiting lines to a specific number, as most editors do this fine by themselves.
I'm a huge fan of meaningful whitespace, and I still order my properties in groups, so they're easier to find and logically placed. 1508 advocates just listing properties alphabetically, but I personally don't like that. I prefer ar more logical grouping better, e.g.:
There should a be TL:DR; that summarizes the most important things
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.