Git Product home page Git Product logo

css's People

Contributors

vajkri avatar

Stargazers

 avatar

Watchers

 avatar

css's Issues

Qualified selectors

README.md, line 445

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:

  • Avoid all nesting, unless:
    • You're using pseudo-classes, like `:hover``
    • You're targeting pseudo-elements, like :before
    • You're using a Modifier

Example:

// Bad
.block {
    .block__element {}
    .block__element:hover {}
}

 // Good
.block {}
.block__element {}
.block__another-element {
    &:hover {}
}
.block--modifier {
    .block__element {}
}

Tabs are better than spaces

README.md, line 38

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.

Meaningful white space

README.md, line 139

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.:

  1. Box model - display mode, width, height, padding, margin etc.
  2. Position - Positioning and offsets
  3. Typography
  4. Background styles
  5. Miscellaneous
  6. Transitions

TL:DR;

There should a be TL:DR; that summarizes the most important things

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.