Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I really prefer Bootstraps grid over something like Bourboun's Neat grid system[0] where I have to pollute my CSS with include statements.

What about creating silent classes for the column sizes you use and `@extend`ing those classes?

  %three-columns {
    @include span-columns(3);
  }
  
  .sidebar {
    @extend %three-columns;
  }
  
  .menu {
    @extend %three-columns;
    background-color: #facade;
  }


This is a good idea and one I have done a bit-- IMO, it is the best of both worlds, though I hadn't thought of using a silent class (did not know there were silent classes, in fact).

Personally, if I am working quickly, I like having what amounts to a grid api exposed to my html and use it a lot, but I agree that it is better if it doesn't have to be baked into the markup.


They are called placeholder selectors if you are looking for them in the Sass documentation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: