Marques (@MarquesCoding) header
Marques (@MarquesCoding) profile picture

I own a computer Working on Valence https://teapawt.org/t.co/uxb9rAIBJz

Joined April 2017
Photo by Marques (@MarquesCoding)Photo by Marques (@MarquesCoding)Photo by Marques (@MarquesCoding)Photo by Marques (@MarquesCoding)Photo by Marques (@MarquesCoding)Photo by Marques (@MarquesCoding)Photo by Marques (@MarquesCoding)Photo by Marques (@MarquesCoding)Photo by Marques (@MarquesCoding)Photo by Marques (@MarquesCoding)
CSS Tip! 🤯 You can create a CSS-only version of this balance slider using a scroll animation on the underlying input[type=range] 🚀 ::-webkit-slider-thumb { view-timeline: --thumb inline; } Scroll animation driven by the slider thumb animates a number between the "min" and "max" of the range 😅 @​property --value { inherits: true; initial-value: 0; syntax: '<integer>'; } @​keyframes sync { to { --value: 100; }} Tie that up to the contain animation-range ⚡️ .control { animation: sync both linear reverse; animation-timeline: --thumb; animation-range: contain; } Hoist the view timeline so all the parts of the control can use it! .control { timeline-scope: --thumb; } Use that value in a counter which is used for the labels. Create a low and a high for each side 😇 .control__label { counter-reset: low var(--value) high calc(100 - var(--value)); } .control__label::before { content: "COFFEE " counter(low) "%"; } .control__label::after { content: counter(high) "% MILK"; } That's the magic of updating the label values ✨ For the big track, it's a fake track. You can make use of the same --value property and do some calc() to work out the width of each part. <div class="control__track"> <div class="control__indicator"></div> </div> .control__track::before { width: calc(var(--value) * 1% - 0.5rem); background: var(--coffee); border-radius: 4px; transition: width 0.1s; } The width leaves a little gap for the indicator piece 🤙 The color calculation for --coffee isn't too wild but again you can use the same --value .control__track { --coffee: hsl(24 74% calc( 24% + (30% * ((100 - var(--value, 0)) / 100)) / 1 ) / 0.4); } Now for the last piece. Making the track change height. You could set up another custom property and animate its value using the --thumb timeline too 🔥 @​property --shift { initial-value: 0; inherits: true; syntax: '<integer>'; } @​keyframes shift { 0%, 31%, 61%, 100% { --shift: 0; } 32%, 60% { --shift: 1; } } Then use that --shift to update the translation of the label and height of the track 🤓 .label { transform: translateY(calc(var(--shift) * 50%)); transition: transform var(--speed) var(--timing); } Cool part here is that you can use the control to work out the @​keyframes percentages 😅 Oh. And the timing for that little bounce? Use the linear() function 😎 :root { --timing: linear( 0, 0.5007 7.21%, 0.7803 12.29%, 0.8883 14.93%, 0.9724 17.63%, 1.0343 20.44%, 1.0754 23.44%, 1.0898 25.22%, 1.0984 27.11%, 1.1014 29.15%, 1.0989 31.4%, 1.0854 35.23%, 1.0196 48.86%, 1.0043 54.06%, 0.9956 59.6%, 0.9925 68.11%, 1 ); } Should probably do a video on this one. Lots of little custom property tricks for sure! 💯 It's not too far off the range slider with the tooltip that came up previously As always, any questions, let me know! Also, this one only works in Chrome currently ✅🥲 This one's a bit rocket science ha 🚀 @CodePen link below! 👇
Prototyped a balance slider today ✨ How do you like your coffee?
36
281
18
2,894
378,178
CSS Trick 🤙 You can use scroll-driven animations on the inline axis to create list animations like in these cards 🫶 article { animation: vibe; animation-timeline: view(inline); animation-range: cover 40% cover 60%; } @​keyframes vibe { 50% { scale: 1; filter: grayscale(0); }} Here you use a view() timeline with the inline axis set inside the function. This means you can hook into the horizontal scroll position of an element inside its scroller 🙌 In this demo, you set a default smaller scale and make each card grayscale 🤏 article { scale: 0.8; filter: grayscale(1); } Then the animation happens as each card enters from the right at 0% and leaves to the left at 100% 🎞️ 50% is the halfway point and in your keyframes you make each card grow and saturate at that point before returning to its original state ✨ scroll-snap provides a nice look-and-feel here and on mobile 🫰 It's really as straightforward as that but made so much easier with a few lines of CSS 💙 For the parallax effect, you can animate a background-position on the card or the object-position on an img depending on what you go with 🤙 Lastly, you can use this today with progressive enhancement by wrapping your scroll-driven animation code in @​supports and @​media ⚡️ Users without support still get a decent experience! @CodePen link below! 👇
Found this old prototype I made for a thing that's been sitting dormant in dropbox for a few years. Never got published, so its memory will now live on in this tweet.
17
355
9
2,747
465,754
Marques retweeted
To share my excitement joining the @TENSTARGG TAPз Vulcan team Ill be doing a 5800 Valorant Points Giveaway (£50) How to enter: 👤 Follow @Emdoublez1 & @Marques_Twitch 👥Tag 2 Friends 🗣️Like & Retweet Winner will be drawn on the 27th of September
203
166
3
194
Recently broke 100k on Youtube so here I am finally unboxing my Silver Play Button. I've prepped a massive giveaway for you guys (we're talking MULTIPLE keysets and high-end mechanical keyboard kits)! Thank you all so much for the support! Watch here: youtu.be/-67dci9ynKU
145
8,274
119
1,564
WTF?!
they added ray tracing in the new minecraft shader dev build i am absolutely shitting myself
17
39
1
585
Final phase of the #RTXStreamOn Contest Giveaway! Randomly selecting the last 7 community members to receive NVIDIA RTX 2060 GPUs! To qualify you must follow me, @GiantWaffle and @NVIDIAGeForce on Twitter, retweet, and tag another Twitch streamer you admire!!
647
543
257
607
Marques retweeted
I am so stoked @Jack_Maynard23 is in I’m a Celeb get me out of here! I’ve always wanted to go on the show! But.. not a celeb so 🙃🤣
186
150
10
2,783
Marques retweeted
legend!! Thanks Calum! Notification Squad on POINT! teapawt.org/calum1506/status/87749…
Replying to @Syndicate
@ProSyndicate @LifeOfTom subbed and dinged the bell
6
16
324
Currently at 99,700 followers. Almost there.
19
25
3
496
Marques retweeted
Why... WHY DID I DO THIS!? youtu.be/8_VksyAqnrQ
1
33
341