Closed wheresrhys closed 10 years ago
The example you posted (and I've had to work with stuff like that myself so understand the pain it causes) is arguably misuse of the tools, and can only really happen if deep nesting is combined with @extend
. I'm not a big fan of @extend
though and only included it the last minute as a way for people to retrofit the grid to existing pages and components without touching the templates. I'm in favour of including a statement discouraging the use, but do however think rules like
img:not(.primary) {
@extend %ft-grid-small-hide
}
can be very handy and don't lead to css bloat. Perhaps:
In general use
ft-grid-col-...
classes and only use@extend
for cases where significant simplification of code is achieved or editing the templates is not possible. Be very careful your css does not become bloated as a result
The other use of @extend
- for gutterless columns - is I think essential as including gutter specifications in the classes (4 layout sizes + default, LHS & RHS) would undoubtedly have a negative impact on readability
OK, happy with that. Just wanted to make sure it had been considered.