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

feat: css var support, closes #30 #31

Merged
merged 7 commits into from
Dec 7, 2021
Merged

Conversation

raae
Copy link
Member

@raae raae commented Dec 6, 2021

  • feat: support for css variables
  • demo: changes in demo to test css variables

@raae raae changed the title feat/css var support closes #30 feat: css var support closes #30 Dec 6, 2021
@raae raae changed the title feat: css var support closes #30 feat: css var support, closes #30 Dec 6, 2021
@raae raae force-pushed the feat/css-var-support-closes-#30 branch from d02cda9 to ae499e9 Compare December 6, 2021 20:19
@gatsby-cloud
Copy link

gatsby-cloud bot commented Dec 6, 2021

Gatsby Cloud Build Report

gatsby-plugin-let-it-snow

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 1m

Performance

Lighthouse report

Metric Score
Performance 💚 100
Accessibility 💚 95
Best Practices 💚 100
SEO 🔶 73

🔗 View full report

@raae raae linked an issue Dec 6, 2021 that may be closed by this pull request
@raae
Copy link
Member Author

raae commented Dec 6, 2021

The solution lets you supply css variables in addition to hex colors. The css variables should still resolve to hex color though.

@bradgarropy
Copy link
Contributor

Don't forget the README update!

@raae
Copy link
Member Author

raae commented Dec 6, 2021

The colors are fetched on initial load, so will not change when dark/light is changes. If moved to the animationFrame it would change dynamically making "new snow" get the new colors.

@bradgarropy
Copy link
Contributor

Ah I see what you're saying. Then animationFrame would definitely be the better option so that a transition would occur eventually.

I think there is still some friction because canvas-confetti wants actual color codes. I wonder if canvas can draw with css variables. But I understand that canvas-confetti is not your library.

@raae
Copy link
Member Author

raae commented Dec 6, 2021

🎉 Moved it into animationFrame, red flakes will appear in dark mode and then disappear again when changing to light mode, demo https://letitsnow-featcssvarsupportcloses30.gtsb.io/.

@raae raae merged commit 3f79993 into main Dec 7, 2021
@raae raae deleted the feat/css-var-support-closes-#30 branch December 7, 2021 12:10
raae-bot pushed a commit that referenced this pull request Dec 7, 2021
# [0.6.0](v0.5.1...v0.6.0) (2021-12-07)

### Features

* css var support, closes [#30](#30) ([#31](#31)) ([3f79993](3f79993))
@raae-bot
Copy link

raae-bot commented Dec 7, 2021

🎉 This PR is included in version 0.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support css variables in the color option
3 participants