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

Error if filename starts with number #1436

Closed
claudia-romano opened this issue Aug 11, 2021 · 2 comments
Closed

Error if filename starts with number #1436

claudia-romano opened this issue Aug 11, 2021 · 2 comments

Comments

@claudia-romano
Copy link

Hi there, is it possible to use a number as the first character of a file name? I get the 'Invalid Sass identifier' error if the filename starts with a number:

Error: Invalid Sass identifier "3d-cards"
   ╷
14 │ @use "components/_3d-cards.scss";

Thanks!

@stof
Copy link
Contributor

stof commented Aug 12, 2021

you need to alias it as to a valid namespace instead of relying on the auto-generated one that takes the file name (as the file name does not produce a valid identifier):

@use "components/_3d-cards.scss" as cards;

@claudia-romano
Copy link
Author

Thank you!

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