Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.8] encapsulate and class binding not working well together #1240

Closed
frankiefu opened this issue Mar 2, 2015 · 2 comments
Closed

[0.8] encapsulate and class binding not working well together #1240

frankiefu opened this issue Mar 2, 2015 · 2 comments
Assignees
Labels

Comments

@frankiefu
Copy link
Member

When using "encapsulate", the class binding will override the class (x-app-x) set for encapsulation.

<dom-module id="x-app" encapsulate>

  <style>

    :host {
      display: block;
    }

    #foo {
      height: 100px;
      background-color: red;
    }

  </style>

  <template>

    <!-- the class binding will override the class (x-app-x) set for encapsulation and causing #foo style to not apply to the div correctly -->
    <div id="foo" class$="[[fooClass]]"></div>

  </template>

</dom-module>

<script>

  Polymer({

    is: 'x-app',

    configure: function() {
      return {
        fooClass: 'foo'
      }
    }

  });

</script>
@ssorallen ssorallen added the 0.8 label Mar 2, 2015
@sorvell sorvell added 0.8 and removed 0.8 labels Mar 5, 2015
@sorvell
Copy link
Contributor

sorvell commented Mar 5, 2015

We may sidestep this by using a styling attribute instead.

@sorvell
Copy link
Contributor

sorvell commented Mar 9, 2015

Fixed via 3d071ec

@sorvell sorvell closed this as completed Mar 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants