What is the best way to globally change the color of the ink in all paper elements used on my site?

148 views
Skip to first unread message

Scott Beeson

unread,
Sep 22, 2014, 9:45:40 PM9/22/14
to polym...@googlegroups.com
I tried simply adding #ink to my custom CSS, but even with the !important attribute it doesn't affect anything.

Marco Scannadinari

unread,
Sep 23, 2014, 1:16:59 PM9/23/14
to polym...@googlegroups.com
The #ink elements are within shadow DOM, so I believe:

* /deep/ #ink { .. }

Rob Dodson

unread,
Sep 23, 2014, 1:30:07 PM9/23/14
to Marco Scannadinari, polymer-dev

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/adc3e87e-aa04-470b-850d-2f945b23fdef%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Scott Beeson

unread,
Sep 23, 2014, 4:49:31 PM9/23/14
to polym...@googlegroups.com
What is the difference between the following solutions?

::shadow #ink { .. }

/deep/ #ink { .. }

Scott Beeson

unread,
Sep 23, 2014, 4:51:07 PM9/23/14
to polym...@googlegroups.com
the "deep" solution doesn't work for me.  Possibly because I'm using LESS?  My compiler doesn't seem to like it.  The "shadow" solution does work however.

Takayoshi Kochi

unread,
Sep 23, 2014, 9:32:11 PM9/23/14
to Scott Beeson, polymer-dev
::shadow only applies to the shadow roots in the current tree scope, while /deep/ is a combinator
which penetrates any number of shadow root boundaries.  So if you have an element with #ink
in nested shadow roots, only the rule with /deep/ can match.

Follow Polymer on Google+: plus.google.com/107187849809354688692

---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Takayoshi Kochi

Rob Dodson

unread,
Sep 23, 2014, 10:09:45 PM9/23/14
to Takayoshi Kochi, Scott Beeson, polymer-dev
I would recommend raising an issue with the LESS team. Both ::shadow and /deep/ have shipped in Chrome (and I believe Opera) so they're valid CSS that need to be supported

Scott Beeson

unread,
Sep 23, 2014, 10:11:02 PM9/23/14
to polym...@googlegroups.com, ko...@chromium.org, sbe...@gmail.com
Thanks, I did find an existing issue on the subject.  It says they did add support, so it must be something with my implementation.

Thanks for the help though, I have it all working as needed!

Brian Sturgill

unread,
Sep 24, 2014, 2:09:05 PM9/24/14
to polym...@googlegroups.com, ko...@chromium.org, sbe...@gmail.com


On Tuesday, September 23, 2014 8:09:45 PM UTC-6, Rob Dodson wrote:
I would recommend raising an issue with the LESS team. Both ::shadow and /deep/ have shipped in Chrome (and I believe Opera) so they're valid CSS that need to be supported

On Tue, Sep 23, 2014 at 6:31 PM, Takayoshi Kochi <ko...@chromium.org> wrote:
::shadow only applies to the shadow roots in the current tree scope, while /deep/ is a combinator
which penetrates any number of shadow root boundaries.  So if you have an element with #ink
in nested shadow roots, only the rule with /deep/ can match.


Just wanted to add feedback to the polymer team that #ink is a very poor choice here. Surely it out to be #paper-ink or #polymer-ink.
As more and more web component sets become available, there are going to be clashes in the global CSS namespace.
 

Rob Dodson

unread,
Sep 24, 2014, 5:01:30 PM9/24/14
to Brian Sturgill, polymer-dev, Takayoshi Kochi, Scott Beeson
That's a good point. I'll open an issue.

Follow Polymer on Google+: plus.google.com/107187849809354688692

---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.

Rob Dodson

unread,
Sep 24, 2014, 5:02:49 PM9/24/14
to Brian Sturgill, polymer-dev, Takayoshi Kochi, Scott Beeson

Brian Sturgill

unread,
Sep 24, 2014, 7:15:43 PM9/24/14
to Rob Dodson, polymer-dev, Takayoshi Kochi, Scott Beeson
Wow, fastest resolution of an issue ever!
Probably needs to to make into the documentation.
For example:
is recommending #ripple and #ink.

Brian
--

Brian

Reply all
Reply to author
Forward
0 new messages