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

Support for the @layer rule #2838

Open
rylydou opened this issue Nov 8, 2023 · 1 comment
Open

Support for the @layer rule #2838

rylydou opened this issue Nov 8, 2023 · 1 comment

Comments

@rylydou
Copy link

rylydou commented Nov 8, 2023

To reproduce:

@layer reset, preflights, layout, atom // This doesn't work: compile error at `,`

// These work fine because of how stylus handles unknown @-rules
@layer reset
	@import 'reset'

@layer preflights
	@import 'vars'
	@import 'common'

@layer layout
	@import 'layout'

@layer atom
	@import 'atom'

Current behavior:

Cannot compile @layer reset, preflights, layout, atom because of an unexpected character.

Can be worked around by using a css literal:

@css {
	@layer reset, preflights, layout, atom;
}

Expected behavior:

It should be able to compile like in this example.

Environment information:

  • stylus version: 0.61.0
  • nodejs version: v18.18.2

Sorry it's a super nitpiky issue because the workaround is super simple. I just thought it should be supported thanks to how much of a lifesaver css layers are by ignoring all specificity.

@silveltman
Copy link

+1

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

2 participants