Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support parsing special selector syntax (::deep, ::v-deep, etc…) #495

Closed
thecrypticace opened this issue May 22, 2023 · 1 comment
Closed

Comments

@thecrypticace
Copy link

In the wild it's not uncommon to see some more esoteric selector syntax being used. Generally in component-using frameworks like Vue, Angular, etc… that also have built-in, scoped styling support.

There seem to be three different classes of selectors:

  • Pseudo-elements that have selector parts after them
  • Custom combinators (>>>, and /deep/)
  • Custom pseudo-class functions taking a selector list

The list of some weird selectors we've seen:

  • .foo ::deep .bar (Blazor),
  • .foo ::v-deep .bar (Vue; deprecated),
  • .foo ::ng-deep .bar (Angular; deprecated)
  • .foo >>> .bar (Angular, Vue; deprecated)
  • .foo /deep/ .bar (Angular, Vue; deprecated),
  • :deep(<selector-list>) (Vue)

In Angular the use of component-piercing in CSS seems to be deprecated — I don't know if there's a replacement syntax for this or not. Additionally in Vue some older syntax has been deprecated.

In any case, these definitely occur in the wild and Lightning CSS currently breaks when trying to parse CSS with these present. It would be fantastic if there were some mechanism by which Lightning CSS could parse these selectors — or at the very least not error on them.

@devongovett
Copy link
Member

Ok, I think I got them all. See above commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants