Open jussiry opened 12 years ago
i already have comma multiselectors in master, _and_
seems clunky, the other features are cool. edit the existing code and send a pull request. there's an extend
function in the source already.
maybe we could overload _
and make that the multiselector:
div_li: ... -> div: ...
li: ...
Hmm, i tried comma separation before adding the feature, but it didn't do anything for me; have to test it again. I'll try to find time to make a fork and add the features with pull request, but might take a while. Maybe two underscores as separator div__li
? I often use underscores in longer id/class names, so using single underscore as separator would brake them.
like i said it's in master and not in the npm version. there are other characters to choose from, like $
. _and_
is just really clunky, and i don't think i would ever personally choose that over just quoting everything.
Ah, i'v never done npm package myself, so didn't realize that of course that's different from master. True, though div$li
probably isn't that pretty either. I'd vote for div__li
or div_li
.
I'd vote for
div__li
ordiv_li
.
sure two underscores seems fine. it shouldn't take very long to add these features, the entire ccss source is under 50 lines.
Started using CCSS in a CoffeeScript framework i'm building (https://github.com/jussiry/houCe), and added some new features to it:
And here's the iterator that adds these features:
Notice that the code uses
merge
function from Sugar.js. You can replace that withextend
from JQuery or Underscore, if those are the libraries of your choice.