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

/deep/, >>>, ::shadow are unsupported #23

Closed
har79 opened this issue Mar 31, 2016 · 2 comments
Closed

/deep/, >>>, ::shadow are unsupported #23

har79 opened this issue Mar 31, 2016 · 2 comments
Assignees

Comments

@har79
Copy link

har79 commented Mar 31, 2016

These selectors are deprecated: https://code.google.com/p/chromium/issues/detail?id=489954
however there isn't a replacement yet and there are still discussions what form that will take so they'll likely be around for quite a while.

csslib's parsing fails when it comes across one of these, with a message of the form
"error on line 33, column 17 of foo.css: expected {, but found /
foo /deep/ #bar {"
from https://github.com/dart-lang/csslib/blob/master/lib/parser.dart#L307

I'll try and come up with a patch, although it'll probably not be in the next couple of weeks.

For future reference, I've traced where I believe the error is coming from:
_errorExpected('{'), l299
_eat(TokenKind.LBRACE), l1042
_processDeclarations(), l985

_processDeclarations() tries to handle "/deep/", because it's not consumed by:
processSelectorGroup(), l981
processSelector(), /1186
simpleSelectorSequence(simpleSequences.length == 0), l1206
simpleSelector(), l1254

@ochafik
Copy link

ochafik commented Jun 28, 2016

Any update on this? There seems to be still lots of /deep/ selectors in the wild, as Angular2's static CSS transforms support it.

ochafik added a commit to google/dart-scissors that referenced this issue Aug 15, 2016
csslib doesn’t deal well with `/deep/`, `:host(.className)` and some
other exotic / deprecated selectors (dart-lang/csslib#23). Although
some of these seem somehow deprecated, they’re still used in Angular as
its transformer replaces some of them at compilation time.
@MonamAgarwal
Copy link

Any update on this? This seems to be causing problem with css-mirroring transformer in scissors also.

@leonsenft leonsenft self-assigned this Jan 10, 2017
leonsenft added a commit to leonsenft/csslib that referenced this issue Jan 20, 2017
leonsenft added a commit to leonsenft/csslib that referenced this issue Jan 20, 2017
leonsenft added a commit to leonsenft/csslib that referenced this issue Jan 20, 2017
leonsenft added a commit to leonsenft/csslib that referenced this issue Jan 25, 2017
leonsenft added a commit that referenced this issue Jan 25, 2017
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

4 participants