-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add canvasDefaultTransparent
#235
Conversation
🦋 Changeset detectedLatest commit: 2187484 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/primer/primitives/CLq37dFxP7ioASbCb87GxjZaM4Cg |
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 good 👍
@@ -3,6 +3,7 @@ import {get, alpha} from '../../../src/utils' | |||
// Variables to be moved to github/github | |||
|
|||
export default { | |||
canvasDefaultTransparent: alpha(get('canvas.default'), 0), |
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 assume that you're adding this in Primitives because github/github doesn't support color functions. Is that correct?
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.
Yes, right. There isn't a way to add transparency to canvas.default
.
Co-authored-by: Cole Bemis <colebemis@github.com>
This adds a new
canvasDefaultTransparent
variable. It will be used to fix the "gradient bug" in Safari: https://github.com/github/github/issues/192288#issuecomment-916696060I've a hard time coming up with a name/place for this variable. It's currently an "app" variable, but it's basically a variation of the global
canvas.default
. And it's meant to be used together like:I almost feel like it should be added to
primitives/data/colors/vars/global_light.ts
Line 79 in 16f4670
primer
tomisc
or something else. Naming hell!! 🔥 😈It's also very similar to
primitives/data/colors/vars/app_light.ts
Line 170 in 773ca67