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

paper-styles destroy custom theme settings when used with importHref #93

@IntranetFactory

Description

@IntranetFactory

When an element which imports paper-styles.html is loaded with importHref then custom theme settings get destroyed.

For example:

I have a basic custom theme defining just the value for one variable

<style is="custom-style">
  :root {
    --default-primary-color: #ff0000;
  }
</style>

In static.html this variable changes the color of a paper-checkbox as expected to red:
image

In failing.html I use importHref to import the paper-checkbox

      Polymer.Base.importHref('../paper-checkbox/paper-checkbox.html', function (e) {
        var cb = document.createElement('paper-checkbox');
        cb.checked = true;
        document.body.appendChild(cb);
      });

and now my-theme is overridden by paper-styles and reverts the checkbox color back to indigo
image

I understand why this currently happens.

I think paper-styles should not be able to just revert my custom theme settings.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions