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

Missing support for @import urls with layer() functions. #8670

Open
kwangure opened this issue May 31, 2023 · 3 comments
Open

Missing support for @import urls with layer() functions. #8670

kwangure opened this issue May 31, 2023 · 3 comments

Comments

@kwangure
Copy link
Contributor

Describe the bug

CSS now has pretty wide support for @layer/layer(). However Svelte chokes on @import statements assigned to a particular layer.

@import url("bootstrap.css") layer(framework);

You can work around by putting the styles in a CSS file then import that file instead, but this only works if you do not preprocess your code to inline CSS brought in via @import or by using JS imports.

Reproduction

https://svelte.dev/repl/0bf3cf34781c4dfa8968cdba3fc1644d?version=3.59.1

Logs

No response

System Info

N/A

Severity

annoyance

@kwangure
Copy link
Contributor Author

When I checked csstree it seemed to already be supported. I think Svelte just needs to updated now.

@benmccann
Copy link
Member

It looks like @layer was added to Svelte in a one-line change here: #7514

Hopefully @import layer() wouldn't be much harder though I confess ignorance to this section of the code

@ngtr6788
Copy link
Contributor

ngtr6788 commented Aug 8, 2023

I noticed that css-tree itself doesn't quite lex/parse the @import rule properly yet, as per this issue: csstree/csstree#259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants