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

Parsing compressed CSS does not work #1927

Closed
alefwmm opened this issue Jun 19, 2015 · 3 comments
Closed

Parsing compressed CSS does not work #1927

alefwmm opened this issue Jun 19, 2015 · 3 comments
Assignees
Labels

Comments

@alefwmm
Copy link

alefwmm commented Jun 19, 2015

The parser for custom properties does not work for compressed CSS like:

:host{--my-custom-color:#F00;}

When not compressed, it works properly:

:host {
    --my-custom-color: #F00;
}
@YuJM
Copy link

YuJM commented Jun 22, 2015

try

(intdex.html )

  <style is="custom-style">
   :root {
   --my-custom-color:#F00;
   }
  </style>

(your custom-element )

  <style>
    :host{ background-color:var(--my-custom-color);
    }
  </style>

@alefwmm
Copy link
Author

alefwmm commented Jun 22, 2015

My bad, I found what the problem really is.
When the last CSS rule is a custom variable and does not have a semi-colon, the problem happens.

This is okay:

:root{--my-custom-color:#F00;}

This is not:

:root{--my-custom-color:#F00}

demo of the bug

sorvell pushed a commit that referenced this issue Jun 24, 2015
… properties

Fixes #1874, #1761: maintain static declarations within declarations that contain custom properties
Fixes #1927: make custom property parser able to see property endings of ; or \n or end token.
@sorvell
Copy link
Contributor

sorvell commented Jun 25, 2015

Fixed via #1948

@sorvell sorvell closed this as completed Jun 25, 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

4 participants