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

CSS Gradient Glitch #84

Open
MentalGear opened this issue May 27, 2017 · 2 comments
Open

CSS Gradient Glitch #84

MentalGear opened this issue May 27, 2017 · 2 comments

Comments

@MentalGear
Copy link

Hi there,
First let me say, that this is an awesome project. I think this is going to become the go to framework for Elm as bootstrap is for css / js.

Issue:
Now, here's the bug I came across on Safari on macOS.
The "fade-out" gradient in the "Choser" Elements has a fade to dark instead of white.

Reason:
The "transparent" keyword. Only Safari & FF seems to use the right w3 standard which is, rgba( 0,0,0,0), all the other browsers use 255,255,255

Proposed fix:
To standardize the right gradient across all browsers, I would suggest using rgba(255.255.255.0) instead of the transparent keyword in all CSS.

Any comments ?
Keep up the good work !

Image of wrong gradient

@gdotdesign
Copy link
Owner

Hey, yes you are right abpit using the rgba value (I keep making this mistake from time to time). Care to make a pr? 😉

@MentalGear
Copy link
Author

MentalGear commented Jun 1, 2017

Sure, but it seems like my git client has an authentication error when trying to make a PR.
However, as this is the only line I changed, I can also show it manually here:

in Properties.elm
line 175
transparent : String
transparent =
"rgba(255,255,255,0)"

Set transparent CSS value to rgba(255,255,255,0)
Description:
The “transparent” css keyword is interpreted by different browsers
either as rgba(255,255,255,0) or rgba(0,0,0,0).
Therefore it is the best to set the value explicitly.
Although the w3 standard seems to be rgba(0,0,0,0), this gives an
unwanted black tone on certain browsers, especially when used within
gradients (Safari).
Therefore, we set it to rgba(255,255,255,0) which should deliver the
expected cross-browser result.

Note: You might want to check this though, as I'm quite the beginner when it comes to Elm.

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

No branches or pull requests

2 participants