Closed Aybee closed 6 years ago
I like this a lot, great idea.
So, there's not a way to build selectors, but there is a way to just use the mixins and whatnot, to create your own selectors…
http://unsemantic.com/sass-documentation#15-roll-your-own
If that works for you, cool. It certainly cuts down on the amount of emitted code.
But, I can't introduce that, as it's a possibly breaking change. For instance, if there's "fuzzy" matching for this…
[class*="grid-"] {}
…that could potentially match things in the page that aren't related to the grid units of Unsemantic.
<table class="grid-of-products">
Etc.
TL;DR = Good idea, but too broad to be a "safe" change for me to just drop in, lest it adversely affect other users of Unsemantic.
I ended up keeping all of the grid-
classes, as doing this also targeted the grid-container
and grid-parent
classes.
However, I did end up using it for the mobile-grid-
and tablet-grid-
classes as those are a little more specific.
Ok, I see. When I find some time I have to dig deeper into sass to find out how to generate those short selectors with it.
I want to get a complete code with short selectors not only an excerpt (interested only on unsemantic-grid-responsive-tablet-no-ie7
).
Yes I know that I can not have other classes that matches those multi selectors then. But thats ok, I know that I do not collide with other classes.
Background is, I'm a developer and it's my daily work to write CSS with the browsers dev tools. I'm working with the CMS contao.org. Within this system I can create sass on the fly, but I'm still a bit old school and prefer working with pure CSS. So maybe you can understand that those long selectors are disruptive to me as I don't need them for my work and I can not hide them in dev tools.
Hello, I like to use unsemantic, but I don't like those long selectors that will be shown in the dev tools - see image:![screen-2017-01-18_22-10-33](https://cloud.githubusercontent.com/assets/1143013/22083243/6b2d45d6-ddcb-11e6-85c2-faf4734d1836.png)
So I shortened the selectors and now it looks as in this image:
Is there a way to build short selectors in unsemantic? My
unsemantic-grid-responsive-tablet-no-ie7-mod.css
looks like this: