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

SCSS v-bind doesn't work with native css darken(...) #10428

Closed
aqordeon opened this issue Feb 29, 2024 · 2 comments
Closed

SCSS v-bind doesn't work with native css darken(...) #10428

aqordeon opened this issue Feb 29, 2024 · 2 comments

Comments

@aqordeon
Copy link

Vue version

3.2.31

Link to minimal reproduction

https://play.vuejs.org/#eNp9Ul1PwjAU/Ss3VQMkfPlBTBBIlJCoD2rUB2P2wFgvc9C1TduNGbL/7l0nyINhL2vvOffec066Zbdad/MM2ZCNbGQS7cCiyzSIUMbjgDkbsEkgIyWtg0U8VUIZGEPjpD+44MvrRiBHvbqPWHRxmGoROqQbwIgnOUQitJYm+f/nx9TPA/ruUQgFG2UE9+QesQka9Q5m+JnWfQsEGymNnGrd3STYVn0LZTiaIZzrAqwSCQeD/MYjYbSOjcok70SV7iHknUUiebMx56FZo2yebn8tlW0Y9M9a80aLOku/tefXTlibMiD7yyTurqySFJRfS4ZUqhOB5lm7hOIJ2LAWVGEhWds8+pozGbZ39egLo/U/9ZUtqlrAXgxaNDkGbI+50MToanj29oQFnfdgqngmiH0EfEWKJas01rQ7CoRkH/C82odUK+MSGb/bWeFQ2p2pSmjFLD0/YPRapkes/8m97F75PkqUlT/StMzo

Steps to reproduce

Have a look at the background-color (not work). The v-bind is working properly on the border but not in background-color because the background-color has native css darken(...) (same as lighten(...) does not work too)

What is expected?

The background color should show

What is actually happening?

The background color is not showing while border color is showing

System Info

No response

Any additional comments?

No response

@edison1105
Copy link
Member

Are you sure native css supports darken?

@aqordeon
Copy link
Author

ahh my bad, you're correct, native css didn't supports darken. I just followed a tutorial I found and didn't notice the SCSS thing. Now I use background-color: v-bind('`color-mix(in srgb, ${bgColor} 80%, black)`'); and it work as I expected. Thanks for remind me.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants