vuejs / component-compiler-utils

Lower level utilities for compiling Vue single file components
319 stars 75 forks source link

feat: implement ::-v-deep as a shadow piercing combinator #54

Closed sodatea closed 5 years ago

sodatea commented 5 years ago

In the long run we should move to shadow parts for such use cases. See this article (the syntax has slightly change since the article published but the idea remains).

A caveats of this implementation: since ::-v-deep is parsed as a pseudo element, we can't elegantly remove the arounding spaces, so there's an extra space remained in the added test case.

Update: as @Justineo pointed out, it is a common practice for a vendor prefixed selector to start with -, so renamed it to ::-v-deep.