Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.

Implement dynamic scoping #3

Closed
sorvell opened this issue Sep 9, 2016 · 3 comments
Closed

Implement dynamic scoping #3

sorvell opened this issue Sep 9, 2016 · 3 comments
Assignees

Comments

@sorvell
Copy link
Contributor

sorvell commented Sep 9, 2016

ShadyCSS adds scoping classes to dom in order to limit application of styles to simulated shadowRoots. Currently, this api is limited to templates that are decorated and then stamped into simulated shadowRoots. It should be able to react to dom mutations and keep this scoping up to date. It probably makes sense to use a deep MutationObserver do to this.

@sorvell sorvell self-assigned this Sep 9, 2016
@kevinSuttle
Copy link

See also: w3c/csswg-drafts#270

@blasten
Copy link

blasten commented Nov 8, 2016

Also, consider when the styles are reset via bindings. The following test case doesn't work:

<dom-module id="x-foo">
  <template>
    <style>
      :host {
        display: block;
      }

      .red {
        color: red;
      }
    </style>
    <div class$="red [[customStyle]]">Red</div>
  </template>
  <script>
    Polymer({
      is: 'x-foo',
      properties: {
        customStyle: {
          type: String,
          value: ''
        }
      }
    });
  </script>
</dom-module>
<x-foo></x-foo>

@sorvell
Copy link
Contributor Author

sorvell commented Nov 9, 2016

Fixed via #25.

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

5 participants