-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Why not using CSS Selector and text align classes ... #268
Comments
Firstly, those text align classes would be a great addition. However your first point is not the same. [class^="col-"] will not match classes that are not the first in the class list (e.g. class="something col-md-12") will not be matched by CSS exporters / bundlers. Which will cause really annoying behavior to anyone using webpack bundler :s |
@Cookizza There is a way around it not being listed as first in the class list. By using the [class*=" class-prefix-"] attribute selector. Basically, by adding a space before the class prefix, it will account for any element that contains the class if it is not the first within the class list. Combine this with the method mentioned by @effone and together it should solve that issue. However, I am not sure what the impact this would have to webpack bundler.
|
[class*="foo"] means: if selector classes contain a class named foo. It doesn't matter if foo is the first, the last or whatever class. |
@Jessman5 Do notice he has [class*=" col-"] and not [class*="col-"] |
@AfonsoFG yes, that'S why I wrote the comment. you don't need the space here. In fact [class*=" col-"] will only fire when you have class=" col-..." and not when you have class="col-..." that could or will cause some trouble. |
And the @dark-side-coder comment covers just that ... but I might be confused... at this point of the day the brain doesn't seems to keep up! |
Is there any specific reason?
The text was updated successfully, but these errors were encountered: