CSS Trick! 🫶
You can make use of calc and custom properties to create that dynamic colored glowy spotlight effect 🎨
[data-glow] {
--hue: calc(var(--base) + (var(--xp) * var(--spread)));
}
Let me show you how! 👇
Few tricks and tips in this video/demo.
In addition to using mask-composite and background-attachment: fixed, passing both the pointer position and its position along an axis allows you to make the spotlight color dynamic 🔥
Setting --x and --xp inside a single JavaScript pointermove event listener allows you to play with pointer position in your CSS ✨
--xp = 0-1 along the x-axis (x / window.innerWidth)
--x = pointerX
--base = starting hue 0-359
--spread = variation in hue that's calculated with --xp
Hopefully, this video breaks things down a little for you and clears things up 🤞 If not, leave me some questions 💙
Created a reduced demo that doesn't have all the configuration stuff. Find the @CodePen link for that below! 👇
🦾 At Salesforce, we’re on a path to realize the potential of generative AI for our customers.
This inflection point has caused us to re-evaluate how we connect with you, our community!
Learn about some of our new methods and #IdeaExchange updates. ⬇️ https://t.co/UZ8XFDB5KF
Do you remember the CSS Gallery, which showcased the best web sites created with CSS?
Which one was your favorite?
– CSS Zen Garden
– Cssbeauty
– CSS Mania
– The CSS Awards
...or some other?
#WebDesignHistory
It was a warm (maybe) early spring US afternoon 24 years ago today when the science-fiction blockbuster #TheMatrix was released. We're adding one more milestone to March 31st: the release date of our #newweb and our brand new look.
Browse around! https://t.co/Pijmhb6upu
We're grateful to be here with the #TrailblazerCommunity for #DF22.
Stop by the tree of gratitude and tell us what you're grateful for.
Drop your note of gratitude below and we'll add it to the tree. 🌲
I just participated in @Salesforce IdeaExchange Prioritization by voting on my favorite ideas. You can #shapeSalesforceProducts too at https://t.co/3e9jpPJfcW by 11 PM PDT on June 6, 2022
@chmiguez No debería ser esa tu búsqueda, debería en base a alguna librería que creas buena, buscar ejemplos de “chat layout”, por ejemplo a mi me gusta tailwind y encontras buenas cosas:
https://t.co/0npdoyLWfp