I made a little thing on @codepen :pure #CSS #scroll controlled swipe transition https://codepen.io/thebabydino/pen/azObZOe

Note how the swipe always clockwise, regardless of scroll direction and how the text fades in after the swipe in.

Inspiration https://x.com/avanderpotte/status/1923382432784412771
(via @codrops motion highlights roundup)

cc @bramus

#scrollAnimation #code #coding #frontend #cssGradient #cssMask #conicGradient #cssMaths #maths #scrollEffect #cssGrid #web #dev #webDev #webDevelopment

Someone asked how to create such cross-browser wave dividers that keep the same height as the width changes, so here's my take on it https://www.reddit.com/r/css/comments/1kcmabf/comment/mq5ck6m/

Live on @codepen https://codepen.io/thebabydino/pen/PwwQxdb?editors=0100

`mask` is another option, but needs an extra container and container query units, so not as well supported, plus it wouldn't be exactly the same shape.

#CSS #clipPath #cssClipPath #Sass #maths #cssMaths #code #coding #web #dev #webDevelopment #webDev #frontend

A fun little scroll-driven thing I made. The text is white over the image, but the image isn't static, it rotates on scroll. 😼

Here's a detailed explanation of the how behind https://www.reddit.com/r/css/comments/1jyu76v/comment/mn2fibt/

Live on @codepen https://codepen.io/thebabydino/pen/dPPbmao

Also uses container queries, CSS trigonometric functions.

#CSS #scroll #cssAnimation #code #web #scrollAnimation #frontend #coding #dev #cssVariables #cssTransform #webDev #webDevelopment #cssMaths #trigonometry

#tinyCSStip Simplifying animations with variables and mathematical functions.

Same result, just not writing almost the same `text-shadow` a bunch of times in a bunch of keyframes.

Live test on @codepen https://codepen.io/thebabydino/pen/MYWXgdZ

#CSS #Maths #code #coding #frontend #web #dev #webDev #webDevelopment
#cssMaths #trigonometry

text glow

...

Because I saw a @codepen demo creating a hex grid using my well over a decade old nested and reverted transforms technique to get the shape + MQs...

Here's a super simple modern #CSS grid + clip-path + mathematical functions responsive version with no breakpoints https://codepen.io/thebabydino/pen/QwWQqeR

#cssLayout #cssGrid #clipPath #hexagon #cssMaths #containerQueryUnits #code #cssVariables #coding #frontend #webDev #web #dev #webDevelopment

Pure CSS responsive hex grid, no breakpoints!

...

Because someone just hearted this #3D demo on @codepen
https://codepen.io/thebabydino/pen/wvybyMo

This was one of the very first demos I made using #CSS trigonometric functions back in '22. They were only supported by Safari at that point and it was a lot of trouble to get to actually try this as I'm on Linux.

#maths #trigonometry #mathematics #cssMaths #code #coding #frontend #web #dev #webDev #webDevelopment #css3D #cssTransform

Animated Möbius strip using CSS mathematical functions

[See me code this](https://youtu.be/QEuRuECyyrA) in ~35 minutes. --- If the work I've been putting out since early 2012 has helped you in any way or ...

Here's a little thing I made for the 1st #CodePenChallenge of '25: pure #CSS tilt & zoom grid on scroll!

Check it out on @codepen

https://codepen.io/thebabydino/pen/jENzprY

Using pure CSS scroll driven animations, grid, variables, mathematical functions, container query units. Also uses an SVG filter for the dissolve effect.

Chromium only.

#scroll #scrollAnimation #cssVariables #cssGrid #cssLayout #cssMaths #containerQueryUnits #svgFilter #SVG #filter #code #coding #frontend #webDev #webDEvelopment #web #dev

Pure CSS tilt & zoom grid on scroll

Made for the [CodePenChallenge](https://codepen.io/challenges/2025/january/1), my take on the [Tilt Grid](https://codepen.io/sebastian-piskaty/pen/rNPG...

Saw https://www.youtube.com/watch?v=An3QMWg3m1c linked last evening & gave the challenge a quick go myself.

My approach was a mostly #CSS one, with minimal HTML (no extra wrappers) and JS (used only to update top item index, ~200 bytes minified).

While it was working, it wasn't pretty, so today I polished the demo & heavily commented the CSS - check it out on @codepen: https://codepen.io/thebabydino/pen/jENaPjd

#cssGrid #cssSubgrid #cssMaths #Maths #code #coding #frontend #web #dev #webDev #webDevelopment #cssLayout #cssVariables

Recreate a Cool Shuffling Effect in Pure CSS

YouTube

We make the background-size fit an integer number of times within the viewport width and height.

We need length division for that, so we use the tan(atan2()) hack by @JaneOri.

Then, we set box dimensions/ margins to be multiples of background-size https://www.reddit.com/r/css/comments/1gp4cq0/comment/lwqkyrd/

Really cool thing is it works well on zoom, see it on @codepen
https://codepen.io/thebabydino/pen/ZEgwBqL

#CSS #Maths #mathematics #cssMaths #cssPattern #pattern #cssGradient #code #web #dev #webDev #webDevelopment #coding #frontend #cssHack

#cssWish Length multiplication/ division.

Got a right triangle where a cathetus is 50vw, hypotenuse is R (unknown), other cathetus is R - 2em

R² = (50vw)² + (R - 2em)²
R² = 2500vw² + R² - 4em·R + 4em²
R = (2500vw² + 4em²)/4em

Can kinda go around it making 1em be 3vw, but... 😞

For anyone wondering what this is even for: computing the radius of the radial gradient that creates a bottom arch for a page header.

#CSS #Maths #cssMaths #code #web #dev #webDevelopment #webDev #frontend #coding