mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Previously, we were rendering every prefix of the dot-separated scope as its own class. So the scope meta.delimiter.method.period.coffee would make a token w/ classes: class="meta, meta-delimiter, meta-delimiter-method, meta-delimiter-method-period…" Now we just give the token each piece of the scope as a class: class="meta delimiter method period coffee" We lose a bit of meaning, in that a scope selector method.period.coffee would match this element in CSS even though it *wouldn't* in TextMate. But we also gain the behavior where longer prefixes are more specific by naturally producing more specific css selectors. So '.meta.delimiter.method' is always more specific than '.meta.delimiter', whereas '.meta-delimiter-method' ties with '.meta-delimiter'. If prefix ambiguities become a problem later we may need to revisit this approach, but I think it's good enough for now.