-
Notifications
You must be signed in to change notification settings - Fork 1
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
adjust leaf glow colors and sizing #105
Comments
@gissoo I adjusted the size of the leaf glow colors in one of my recent updates (I just halved all the numbers, since our leaf size is half the size of your design in Figma). Do you still have concerns about the colors? Also, any thoughts on what to do about Safari, where the glow isn't working at all? |
@rlskoeser thank you! I still have concerns but haven't gotten to it yet. I'll work on this next week |
@gissoo if we want to use an svg filter effect (which seems like a good option, they seem to be much more powerful than css filters), then I think we should define a preliminary svg in the template code. Examples:
The svg should go roughly here: https://github.com/Princeton-CDH/lenape-timetree/blob/develop/layouts/index.html#L14-L16 I'll have to update the d3.js code to find and update the existing svg instead of creating it, and then when highlighting leaves the code will need to enable/disable the filter. |
@rlskoeser thank you! Just to document here:
I agree on trying the SVG effect, hopefully it will get rid of the white glow. I came across this one yesterday which uses SVG, so I can try this as well |
@rlskoeser I spent a lot of time on this later last week but couldn't get it to work. Here is what I did:
But I don't know if I'm linking correctly, or if I should just comment out everything on the scss and do everything in the html file. I didn't think it would be this complicated :( |
Sorry this is difficult, Gissoo, I wondered if it might be. The SVG filter can't be applied in CSS, it has to be set within the SVG (and will have to be toggled with javascript to make it dynamic). Were you able to preview at all if this filter does what you want? Do you want me to try implementing it? Or would it work to try implementing this filter in Figma? I guess we'll need a different filter for each leaf color. That's not too bad, though. |
@rlskoeser ahh it needs to be within the leaf svg?? |
resolved in PR #188 |
Here are the relevant files for you to adjust colors and size of the glow. All the scss files are under
themes/timetree/assets
.(the links will take you to specific lines that are most relevant; these changes have now been merged into develop)
I think I copied the colors correctly from Figma, but please confirm. You'll see I have commented out
rgba
versions of the colors, which were available in the Figma styles; I can't remember why I didn't use those. Could be useful to play with the rgba versions and the opacity.I wonder if the browsers automatically decrease the opacity for the color used to generate the glow / shadow?
Not sure what's going on with Safari, I would guess it doesn't properly support the css filter we have to use with SVG path elements. I found an issue suggesting problems with filter + drop-shadow on Safari, but IDK if this is exactly our problem.
Originally posted by @rlskoeser in #98 (comment)
The text was updated successfully, but these errors were encountered: