Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug?] When I use cssvars like --red-1, this package will treat --red-1 as a keyword #63

Closed
recovery-alt opened this issue Nov 30, 2021 · 2 comments

Comments

@recovery-alt
Copy link

So what is the purpose of changing var keyword = /(\D+)/; to var keyword = /(\w+)/; in index.js line 55?
Is it a bug or a extra consideration?
Maybe var keyword = /^(\w+)$/; will be more suitable?
Looking forward to your reply, thanks.

@recovery-alt recovery-alt changed the title When I use cssvars like --red-1, this package will treet --red-1 as a keyword [Bug] When I use cssvars like --red-1, this package will treet --red-1 as a keyword Nov 30, 2021
@recovery-alt
Copy link
Author

The way to reproduce.

  1. Fork my project.
  2. yarn install and yarn build
  3. You will see the result css in the dist/css fold.
// source code
#app {
  color: var(--red);
}
// transform code
#app {
  color: var(red);
}

@recovery-alt recovery-alt changed the title [Bug] When I use cssvars like --red-1, this package will treet --red-1 as a keyword [Bug?] When I use cssvars like --red-1, this package will treet --red-1 as a keyword Nov 30, 2021
@recovery-alt recovery-alt changed the title [Bug?] When I use cssvars like --red-1, this package will treet --red-1 as a keyword [Bug?] When I use cssvars like --red-1, this package will treat --red-1 as a keyword Nov 30, 2021
@Qix-
Copy link
Owner

Qix- commented Nov 30, 2021

Variables aren't valid colors, I don't know why you'd be passing them in as such. They've never been supported in this package.

@Qix- Qix- closed this as completed Nov 30, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants