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 for Shadow DOM styling #452

Closed
trevordmiller opened this issue Jul 26, 2014 · 17 comments · Fixed by #994
Closed

Support for Shadow DOM styling #452

trevordmiller opened this issue Jul 26, 2014 · 17 comments · Fixed by #994

Comments

@trevordmiller
Copy link

trevordmiller commented Jul 26, 2014

When trying to use the /deep/ Shadow DOM selectors for Web Components, the libsass compiler throws an error:

Warning: /Users/trevordmiller/Sites/github/frontendtv.github.io/app/styles/main.scss:41: error: invalid top-level expression

Can support be added for Shadow DOM / Web Components / Polymer related selectors like /deep/, ::shadow and ':host` etc.?

http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-201/

@matthiasbayer
Copy link

Any news on this issue?

@HamptonMakes
Copy link
Member

Can you please give a test case or example of this code that you want to work, and how you'd expect it to behave?

@malrase
Copy link

malrase commented Oct 6, 2014

Using /deep/ definitely breaks libsass:
http://sassmeister.com/gist/abebd8016d9a9e9caccb

However, using ::shadow and :host seems to be OK?
http://sassmeister.com/gist/d3869019da2eb39d9fcc

I'll add a test-case for /deep/, though.

@malrase
Copy link

malrase commented Oct 6, 2014

D'oh, someone's already added the test:
https://github.com/sass/sass-spec/tree/master/spec/libsass-todo-issues/issue_452

The "needs test" tag can be removed.

@xzyfer
Copy link
Contributor

xzyfer commented Oct 15, 2014

For reference this is the Selectors Level 4 Reference combinator

@john-landgrave
Copy link

Any movement on this? Or can anyone point me at the general place to step in to making this change myself?

@xzyfer
Copy link
Contributor

xzyfer commented Nov 26, 2014

I'd started work on this bug haven't come back around to it.

It required a decent amount of changes to how we handle selectors. The proper fix for this will also address some other issues. i.e. #593

silentHoo added a commit to silentHoo/polymer-survey-app that referenced this issue Jan 15, 2015
@peterblazejewicz
Copy link

👍

@hackingbeauty
Copy link

Can this please get fixed and merged? I'm not able to use libsass in my Polymer project.

@peterblazejewicz
Copy link

@Panya
Copy link

Panya commented Jan 27, 2015

BTW /deep/ was changed to >>> (http://dev.w3.org/csswg/css-scoping-1/#deep-combinator)

@JosefJezek
Copy link

@HamptonMakes HamptonMakes changed the title Support for Shadow DOM styling Support for Shadow DOM styling [$5] Feb 21, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Mar 28, 2015
@mgreter mgreter modified the milestones: 3.2.1, 3.2 Mar 31, 2015
@xzyfer xzyfer modified the milestones: 3.2.2, 3.3 May 1, 2015
@mgreter mgreter modified the milestones: 3.4, 3.3 Jun 13, 2015
@mgreter
Copy link
Contributor

mgreter commented Jul 13, 2015

@xzyfer I'm confused. The spec test seems to be passing!? Can this be closed again?

@mgreter mgreter modified the milestones: 3.3.1, 3.4, 3.3 Jul 16, 2015
@mgreter mgreter self-assigned this Jul 16, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Jul 16, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Jul 16, 2015
@xzyfer
Copy link
Contributor

xzyfer commented Jul 17, 2015

This can be closed. It has been fixed in 3.3.

@xzyfer xzyfer closed this as completed Jul 17, 2015
@mgol
Copy link

mgol commented Jul 17, 2015

/deep/ is deprecated. Only Chrome has implemented it and it plans to remove it soon (just see the console on the new tab page in Chrome Canary). They've tried to change the combinator from /deep/ to >>> but no form has been accepted by other browser vendors and it will most likely be removed from the spec.

In any case, current version of the spec says about >>>, not /deep/.

Does libsass still plan to support this obsolete selector?

@xzyfer
Copy link
Contributor

xzyfer commented Jul 17, 2015

Thanks we're aware, however it's a part of a spec, code exists with it that
we need to support and most importantly Ruby Sass supports so we must also.
On 17 Jul 2015 17:45, "Michał Gołębiowski" [email protected] wrote:

/deep/ is deprecated. Only Chrome has implemented it and it plans to
remove it soon (just see the console on the new tab page in Chrome Canary).
They've tried to change the combinator from /deep/ to >>> but no form has
been accepted by other browser vendors and it has been removed from the
spec.


Reply to this email directly or view it on GitHub
#452 (comment).

@mgreter mgreter removed the bounty label Oct 22, 2016
@HamptonMakes HamptonMakes changed the title Support for Shadow DOM styling [$5] Support for Shadow DOM styling [$5 awarded] Nov 5, 2016
@HamptonMakes HamptonMakes changed the title Support for Shadow DOM styling [$5 awarded] Support for Shadow DOM styling Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment