Closed davidhund closed 12 years ago
Thanks. Feel free to adapt the code for your own use, but I really dont like using the [class*="blob-"]
pattern. Name clashes is one reason, the other is that the unit-*
styles are independent of the grid classes and can be used elsewhere to control component widths without being part of the grid itself.
Thanks for this, Necolas. It looks really nice and flexible and I plan to experiment with it soon.
I realize you've implemented this in a 'OOCSS, BEM or SMACSS like' manner but is there a specific reason you are including the separate
grid__cell
'sub-objects' and not doing e.g.[class*="unit-"]{ /* grid__cell rules… */ }
?Clarity (self-documentation) and potential class-clashes (
.unit-i-just-made-up
) come to mind but omitting thegrid__cell
does make the HTML a bit less class-cluttered ;)Adding this 'feature' would be as simple as changing _grid-core.scss#L62 from
.grid__cell {
to.grid__cell, [class*="unit-"] {
no? This would remove the requirement to use thegrid__cell
class for people who would rather not include it in every cell element.