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

Polymer 3 style modules not processed v0.6.0 #27

Open
freshp86 opened this issue Dec 18, 2018 · 1 comment
Open

Polymer 3 style modules not processed v0.6.0 #27

freshp86 opened this issue Dec 18, 2018 · 1 comment

Comments

@freshp86
Copy link

freshp86 commented Dec 18, 2018

Example JS file (using the syntax from the Polymer 3 documentation)

Contents of foo.js

const styleElement = document.createElement('dom-module');
styleElement.innerHTML =
  `<template>
    <style>
      foo {
        --my-mixin: {
          color: white;
          background: blue;
        };
      }
    </style>
  </template>`;
styleElement.register('style-element');

Executing the following command

node_modules/polymer-css-build/bin/polymer-css-build -f foo.js -o foo_pcb.js

Expected: The CSS mixin should have been processed (converted to CSS variables)
Actual (pasted below): The CSS mixin has not been processed.

contents of foo_pcb.js

const styleElement = document.createElement('dom-module');
styleElement.innerHTML = `<template>
    <style>
      foo {
        --my-mixin: {
          color: white;
          background: blue;
        };
      }
    </style>
  </template>`;
styleElement.register('style-element');

On the other hand, if the Polymer 2 syntax is used (using HTML files) the CSS mixin is processed.

before

<dom-module id="shared-style">
  <template>
    <style>
      foo {
        --my-mixin: {
          color: white;
          background: blue;
        };
      }
    </style>
  </template>
</dom-module>

after

<dom-module id="shared-style">
  <template>
    <style scope="shared-style">foo {
  --my-mixin_-_color:  white; --my-mixin_-_background:  blue;;
}

</style>
  </template>
</dom-module>

cc @azakus

@freshp86 freshp86 changed the title Polymer 3 style modules not processed Polymer 3 style modules not processed v0.6.0 Dec 18, 2018
@dfreedm
Copy link
Member

dfreedm commented Oct 17, 2019

Should be working with v0.7.0!

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

2 participants