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

Allow .css file to be imported and compiled like an .styl file #2740

Open
yuriuseu opened this issue Nov 26, 2022 Discussed in #2739 · 0 comments
Open

Allow .css file to be imported and compiled like an .styl file #2740

yuriuseu opened this issue Nov 26, 2022 Discussed in #2739 · 0 comments

Comments

@yuriuseu
Copy link

Discussed in #2739

Originally posted by Yuriuseu November 25, 2022
Say, I want to declare variables in plain.css file:

variable = "value"

and import that in another.css file:

@import "plain.css";

.class {
  property: variable; // variable is treated as a literal value of property
}

This compiles as intended if we declare the variable directly or if we change the extension of plain.css to .styl.

Now, I understand that the syntax will be messy in some editors, but considering that a single .css file with stylus content can be compiled normally in the first place, so why not allow plain .css to be treated just like an .styl file when imported?

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

1 participant