One thing to note about this implementation is the lack of any sanitization/trimming of each "part" of the selector. This means the whitespace that is before a selector will be maintained - [data-foo] is not the same as [data-foo]. I originally implemented it in a way that would trim each part, but that approach seemed a little too opinionated (and isn't what glamor does anyway). So the example in the issue should actually be slightly tweaked to have the space removed for the intended effect:
Resolves #124
One thing to note about this implementation is the lack of any sanitization/trimming of each "part" of the selector. This means the whitespace that is before a selector will be maintained -
[data-foo]
is not the same as[data-foo]
. I originally implemented it in a way that would trim each part, but that approach seemed a little too opinionated (and isn't whatglamor
does anyway). So the example in the issue should actually be slightly tweaked to have the space removed for the intended effect: