Ana Tudor
@anatudor.bsky.social
5.2K followers 58 following 2.5K posts
Same me, another platform. I code stuff. It usually involves some Maths. I enjoy music mandatory religion classes warned me about. And other things that may kill me. https://thebabydino.github.io/
Posts Media Videos Starter Packs
Pinned
anatudor.bsky.social
For anyone who missed it: I have now set up membership tiers on Ko-fi! #KofiMembershipChallenge

ko-fi.com/anatudor

Because praise doesn't keep me afloat... but you can!
Support Ana Tudor
If you like my work and you want me to be able to continue coding, please consider supporting it.
ko-fi.com
anatudor.bsky.social
Forgive me for I have sinned and asked Gemini for dummy text for CodePen demos...
Partial screenshot of me asking Gemini for "an unreal Halloween recipe featuring things that are bound to sound disgusting like spider webs, human limbs, roaches, mud, snake venom?" and getting back a "gloriously grotesque" recipe for "Grave Dirt and Viper's Brew".
anatudor.bsky.social
They don't factor in scrollbars. Not per spec & last I checked, not in practice in browsers either.

www.smashingmagazine.com/2023/12/new-...

`dvh` helps if the keyboard pops up or smth. But `dvw` & `svw` include the vertical scrollbar.

Container query units are the answer bsky.app/profile/anat...
anatudor.bsky.social
As for the `margin`, I'd either zero it on all elements (poor man's reset):

```
* { margin: 0 }
```

Or specifically on the `body`.

```
body { margin: 0 }
```

The `html` doesn't have a `margin` by default. And neither do `div` elements, which I'm assuming `#app` is.
anatudor.bsky.social
Why?

Assuming `#app` is the one visible child of the `body`, you can have it cover all available viewport space minus any scrollbars with:

```
html, body { display: grid }
html { min-height: 100% }
```

Then you can set any styles you want on the `#app`, including a flex layout if that works best.
anatudor.bsky.social
Even if it wasn't problematic, setting `width: 100vw` on the `body` would still be unnecessary.

And now we have container query units. Make the `html` a container, use `100cqw`. Like here codepen.io/thebabydino/...

If other containers are needed, we can do this frontendmasters.com/blog/using-c...
Super simple full-bleed + breakout tactic
[My take on a question asked on reddit](https://www.reddit.com/r/css/comments/1o3j0cl/comment/niwx1pj/). --- If the work I've been putting out since ...
codepen.io
anatudor.bsky.social
Please stop setting `width: 100vw` on the `body`.

It's unnecessary. By default, the `body` stretches horizontally as much as necessary.

It's problematic. Setting `width: 100vw` on it can cause overflow even if you remove the default `margin`... because the page may have a scrollbar.

#CSS
Reposted by Ana Tudor
anatudor.bsky.social
This uses JS and a circle for each dot. However, it can be done with pure CSS and one element using this technique frontendmasters.com/blog/pure-cs...
anatudor.bsky.social
I know that, but from a practical standpoint, `curve` doesn't work in Firefox at this point even with the flag enabled (`arc` does). At the same time, if you do have the flag enabled, the `@supports` test with a `curve` in it passes, so in addition to `shape()` failing, the fallback fails too.
anatudor.bsky.social
Also in theses cases, it's really useful to either min the height to twice the rounding size or max the rounding to half the height.
anatudor.bsky.social
Did something similar with `arc` instead of `curve`
codepen.io/thebabydino/...

`arc` is already supported in Firefox behind a flag. While `curve` isn't, but the `@supports` test with a `curve` path still passes, so then it doesn't even use the fallback.
Cool concave rounding header component
Mentioned in my [Obsessing Over Smooth `radial-gradient()` Disc Edges](https://frontendmasters.com/blog/obsessing-over-smooth-radial-gradient-disc-edge...
codepen.io
anatudor.bsky.social
Don't miss your flight. I once heard my name called because I was so lost in CSS, it didn't register with me people were boarding.
Reposted by Ana Tudor
anatudor.bsky.social
#tinyCSStip: sphere volume distribution with polar coordinates!

u = rand(0, 1)
v = rand(0, 1)
w = rand(0, 1)

θ = 2·π·u
φ = acos(2·v - 1) - π/2

❌ DON'T (middle cluster)
r = R·w

✅ DO
r = R·∛w

➞ x,y,z
x = r·cos(φ)·sin(θ)
y = r·sin(φ)
z = r·cos(φ)·cos(θ)

https://codepen.io/thebabydino/pen/abLRNqV
Uniform distribution of dots within the volume of a sphere.
anatudor.bsky.social
Little seasonal thing: candy 🍬 ghost 👻 buttons, 3 techniques in one @codepen.io demo
codepen.io/thebabydino/...

Detailed explanation of the how behind in this @css-tricks.bsky.social post css-tricks.com/css-ing-cand...

Bonus: a hover animated, Chrome-only version codepen.io/thebabydino/...

#CSS
Bright candy gradient ghost buttons. Same buttons in various stages of hover, when the filling content-box get XOR-ed with the text.
anatudor.bsky.social
An older little #canvas demo on @codepen.io: codepen.io/thebabydino/...

mouseover the 🔺🔻 - your eyes see what your mind wants to see 😼

#JS
Screenshot of the linked CodePen demo. A grid of randomly oriented, randomly smaller or bigger equilateral triangles. This grid of triangles is painted using a rainbow radial gradient at the mouse cursor position, with triangles further away from the cursor also fading a little.
Reposted by Ana Tudor
anatudor.bsky.social
Turn black to red CSS linear gradient into step one with a super simple #SVG #filter: interactive demo allowing to drag a slider to change the number of steps n and see how the visual result and relevant part of the filter code change.

@codepen.io demo codepen.io/thebabydino/...

Feedback?

#CSS
Red channel n steps gradient - the interactive demo
...
codepen.io
Reposted by Ana Tudor
anatudor.bsky.social
A little simple corner only gradient border on @codepen.io: codepen.io/thebabydino/...

Allows for semi-transparent background. Minimal code, easy to tweak to your needs, just change the variables. Heavily commented. Corner spacing around text adjusts with border rounding.

#CSS
Corner-only border (allows for corner rounding & gradient border)
Continuous gradient border, but only at the rounded corners. The element also has a transparent background through which we can see the image backdrop ...
codepen.io
Reposted by Ana Tudor
anatudor.bsky.social
Someone hearted my orbits loader so I just had to scramble to quickly update it to use CSS grid instead of absolute positioning, CSS trig instead of precomputing tan in the Pug & passing it to the #CSS as a custom property & individual transform functions.
On @codepen.io 👉 codepen.io/thebabydino/...
Pastel balls going around on concentric orbits. The bigger the orbit, the more balls on it.
anatudor.bsky.social
One of my earliest #3D @codepen.io demos got a '25 remake codepen.io/thebabydino/...

Uses #CSS variables + trigonometric functions. If you've ever looked at the MDN trig function examples & wondered "why would I ever use that?" - I get it, those are bad examples. This demo has better ones.

#Maths
Pure CSS Rotating Spiral Image Gallery
2025 remake using modern CSS. --- If the work I've been putting out since early 2012 has helped you in any way or you just like it, then please remem...
codepen.io
Reposted by Ana Tudor
remysharp.com
We don't have a sponsor for #FFConf 2025 scholarship programme (we didn't last year too) I really don't want to have to add this terrible sticker again…

The sponsorship allows us budget not only for ticket allocation, but also travel and hotel for under represented groups.

💌 [email protected]
A crappy 90's style clipart that reads "Rem & Jules" being the scholarship sponsors.
anatudor.bsky.social
A little pure #CSS demo I made a while back on @codepen.io: codepen.io/thebabydino/...
screenshot of linked demo