threepointone/glamor

prevent `label` from being added to the css applied

Closed this issue ยท 5 comments

Because this doesn't seem right and I think people will be concerned about it and not use the label feature.

screen shot 2017-07-24 at 5 46 48 pm

Also, side question, what would happen if I nested the label? Nothing?

I could totally remove the label from the actual css being injected, not a problem.

Nested labels should get combined; idea being to show labels of all the styles being composed. In a previous version, it would sorta approximate the tree of labels and show it in the data attribute value itself, dialled it back to simple concatenation. I'm happy to iterate on this based on feedback, let me know what works best.

Concatenating makes sense ๐Ÿ‘

Also: css({label: 'foo'})...

I would expect that to be: css-foo-nil

but it's "css-foo-1cepw5k"

I thought about it, and I think it labels should participate in hashing, if only to differentiate origins. I'm going to leave that behaviour as is for now, but let me know if it causes actual problems.

(there's also the fact that it would be expensive to remove the labels before hashing, but we'll cross that bridge if and when we come to it)

published 2.20.37, that doesn't include the label in the generated css ๐ŸŽŠ

Perfect! Thanks!