Skip to content

[0.9] Can't override the css property if the property is already set on the host via custom property #1525

Description

@frankiefu

x-toolbar.html

<style is="custom-style">
  :root {
    --toolbar-color: blue;
  }
</style>

<dom-module id="x-toolbar">
  <style>
    :host {
      display: block;
      height: 64px;
      background: var(--toolbar-color);
    }
  </style>

  <template>
    <content></content>
  </template>

  <script>
    Polymer({
      is: 'x-toolbar'
    });
  </script>

</dom-module>

app.html

<style>
  x-toolbar {
    background: red;
  }
</style>

<x-toolbar></x-toolbar>

This should make x-toolbar have "red" background but instead it displays as "blue". Also noticed if shadow dom is on (dom=shadow) then the correct color ("blue") is shown.

Activity

  1. sorvell commented on May 14, 2015

    @sorvell
    Contributor

    Maybe related #1277

  2. sorvell commented on May 21, 2015

    @sorvell
    Contributor

    Fixed via 041b732

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions