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

Setting styles with @layer doesn’t work #1

Closed
knowler opened this issue Sep 1, 2022 · 2 comments
Closed

Setting styles with @layer doesn’t work #1

knowler opened this issue Sep 1, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@knowler
Copy link

knowler commented Sep 1, 2022

This works fine:

<style>
@layer elements, page;
</style>

This doesn’t work:

<style>
@layer elements {
  :host {
    /* some styles */
  }
}
</style>

I get this error message: undefined:4:9: missing '}'

If I change the selector inside of the @layer to be something else (like an element):

<style>
@layer elements {
  label {
    /* some styles */
  }
}
</style>

I get this error message: undefined:4:14: property missing ':'

@ryanblock ryanblock added the bug Something isn't working label Sep 1, 2022
@ryanblock
Copy link

Looks like this issue can probably be traced back to this issue in css: reworkcss/css#165

@ryanbethel
Copy link
Contributor

@knowler Thanks for reporting the bug. Like @ryanblock mentioned this is caused by the css parser we use. We are discussing how best to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants