-
-
Notifications
You must be signed in to change notification settings - Fork 79k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change .col-{size}-{n} to .col.{size}-{n} #17228
Comments
While I think |
I think "chained classes" is a bad way. So, we should discuss
|
I agree with @YaroslavShapoval. We should really write it as |
I also have a feeling that using |
CC: @mdo |
Possible also reconsider using partial attribute selectors in stead of base classes: #10332 (comment) also see http://benfrain.com/css-performance-revisited-selectors-bloat-expensive-styles/ |
@bassjobsen Doesn't seem workable due to lack of robustness:
|
@cvrebert what u think about this way? .row .col.col-{size}-{n} { // } |
@lcdss |
@cvrebert i suggest |
Coming in #19099. |
Reopening since it doesn't seem like the final version of #19099 actually ended up addressing this. |
CC: @mdo |
Ah, yeah, sorry about that. I ended up not going the base class route for the grid. Not in #19099 and not in the newly updated #20349 (which restores some grid behavior from pre-#19099). Edit: Building on that, it felt unnecessary. The grid works pretty great in v3 and I think I tried to get a little to creative with reinventing it in v4. Adding the flexbox variation is enough of a differentiation, but then I tried to break up classes, combine mixins, etc. Didn't lead to anything better, just something different with different nuances. |
As we use things like
.table.table-striped
and.btn.btn-primary
I suggest we use.col.{size}-{n}
and so on. This allows us to simplify from:To:
This would also allow us to use
.{size}-{n}
(and the related offsets, pushes, and pulls) for things other than columns (e.g. form groups where we might not want the min-height, position, and/or padding of columns).The text was updated successfully, but these errors were encountered: