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

feat(vscode): better color preview #2036

Merged
merged 3 commits into from Jan 2, 2023
Merged

Conversation

zam157
Copy link
Contributor

@zam157 zam157 commented Dec 31, 2022

Related issues: #1348 #1767 #1817

The old method of matching colors is not perfect. As Fu commented:

I guess we could infer the color from the generated CSS instead of relying on the theme object.

That's what I've done in this PR

image

image

@zam157 zam157 requested a review from antfu as a code owner December 31, 2022 09:30
@netlify
Copy link

netlify bot commented Dec 31, 2022

Deploy Preview for unocss ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 59c6e62
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/63b0011a3cf0c8000880a54c
😎 Deploy Preview https://deploy-preview-2036--unocss.netlify.app/play
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@antfu antfu merged commit 4bc3272 into unocss:main Jan 2, 2023
praburangki pushed a commit to praburangki/unocss that referenced this pull request Jan 12, 2023
* feat(vscode): better color preview

* feat(vscode): better color preview in suggestions

* refactor(vscode): enhance readability
@eweren
Copy link

eweren commented Mar 15, 2023

Stumbled on this PR and I guess this is related: When relying on CSS variables for colors this is not resolved. Like here:
image

Is resolved as black, but should be green (the variable has the same value as the var(...)-fallback value right here

@antfu, @zam157

@zam157
Copy link
Contributor Author

zam157 commented Mar 16, 2023

Stumbled on this PR and I guess this is related: When relying on CSS variables for colors this is not resolved. Like here:
image

Is resolved as black, but should be green (the variable has the same value as the var(...)-fallback value right here

@antfu, @zam157

Please open a new issue, and I'll try to solve it if I have time

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

Successfully merging this pull request may close these issues.

None yet

3 participants