-
Notifications
You must be signed in to change notification settings - Fork 701
Add bgLighten to Base #446
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
Conversation
kitten
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty great! 😬 I’m wondering whether it’d make sense to unify these props so that they don’t conflict as much (maybe negative numbers for darken? Or custom overlay colours?) cc @kenwheeler
|
Custom overlay colours would be a great one. Something like |
|
Lets do that. That will be tight |
|
Please review and check whether we can continue like this or not. |
| return convertedFontSize; | ||
| }; | ||
|
|
||
| const hexToRGB = function (hex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of maintaining this piece of code ourselves it should probably use a helper. Polished has some excellent ones and we won't need to pull in the entire library ✨
https://polished.js.org/docs/#transparentize
or
| bgImage, | ||
| bgDarken, | ||
| bgOverlayColour, | ||
| bgOverlayIntensity, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't call this prop "intensity" as that would refer to the saturation of the colour: https://www.uwgb.edu/heuerc/2D/ColorTerms.html
Instead I would just call this "opacity" or "opacify" or "transparentize" depending on what it'll do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its bgTransparentize now ✨
|
Can you verify if I did it right? @philpl |
|
@kitten @kenwheeler Can you check? |
|
Hey @aravindballa thank you so much for your work on this! I am closing this since the functionality was added in #531 (along with some other changes we needed), which will be merged soon. |
Fixes #445
Added a new prop
bgLightento Base so that it supports lightening images.Screenshot: