Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Native custom properties does not work #117

Open
4 tasks done
tomalec opened this issue Mar 8, 2017 · 0 comments
Open
4 tasks done

Native custom properties does not work #117

tomalec opened this issue Mar 8, 2017 · 0 comments

Comments

@tomalec
Copy link

tomalec commented Mar 8, 2017

Description

According to https://www.webcomponents.org/element/PolymerElements/paper-toggle-button/paper-toggle-button#styling "custom properties are available for styling"

I would like to use them in stylesheet loaded via <link> together with lots of other stuff.

paper-toggle-button{
  --paper-toggle-button-unchecked-button-color: pink;
}
<paper-toggle-button></paper-toggle-button>

Expected outcome

Button should be pink

Actual outcome

Button is white

Live Demo

https://jsbin.com/dakiya/1/edit?html,output

Steps to reproduce

  1. Put a paper-toggle-button element in the page.
  2. Apply custom property to it, like
     paper-toggle-button{
       --paper-toggle-button-unchecked-button-color: pink;
     }
  3. Open the page in a web browser.

Browsers Affected

  • Chrome
  • Firefox
  • [?] Safari 9
  • [?] Safari 8
  • [?] Safari 7
  • Edge
  • IE 11
  • [?] IE 10

For vanilla Shadow DOM it works like charm
http://jsbin.com/legefom/2/edit?html,output

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

No branches or pull requests

1 participant