Native CSS variable support

53 views
Skip to first unread message

Michael Giuffrida

unread,
Jan 26, 2016, 4:57:36 PM1/26/16
to polymer-dev
Hey Polymer folks,

The latest desktop Chrome supports CSS custom variables natively, as has Firefox for a while now. This should increase performance compared with shimming variables.

Is the Polymer shim aware of native implementations, or does it still spend cycles shimming them? Does this behavior change depending on how styling is done (<custom-style>s, inside/outside dom-modules, etc.)?

Eric Bidelman

unread,
Jan 26, 2016, 9:58:45 PM1/26/16
to Michael Giuffrida, polymer-dev, Steve Orvell
+Steve Orvell 

I believe the shimmer runs regardless of native implementation. That's b/c other features like mixins and @apply are not implemented in any browser.

We've talked about a tool to pre-him styles. Not sure where that is the priority pipeline....

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/CACi5S_3kTTVdNKK34zbndvky027odYz6j36mF1fEL1sjZasTsQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Chris Joel

unread,
Jan 27, 2016, 12:12:05 PM1/27/16
to Eric Bidelman, Michael Giuffrida, polymer-dev, Steve Orvell

I can only speculate, but it is likely that when we do enable use of native custom properties, it will be in the form of an on/off switch (similar to toggling between Shadow and Shady DOM).


Steve Orvell

unread,
Jan 27, 2016, 3:25:42 PM1/27/16
to Chris Joel, Eric Bidelman, Michael Giuffrida, polymer-dev
We plan to add support for native custom properties. Because of our use of `@apply`, it's not quite as simple as just not doing the shimming when the native feature is available.

Steve Orvell

unread,
Jan 27, 2016, 3:30:35 PM1/27/16
to Chris Joel, Eric Bidelman, Michael Giuffrida, polymer-dev
Reply all
Reply to author
Forward
0 new messages