zachleat@zachleat.com’s Mastodon Archive

♻️ Reblog of jhey ʕ·ᴥ·ʔ :verified: (jhey@front-end.social)

CSS Tip! ✨

I was indeed triggered by @seaotta to bust out some CSS trigonometric function demos for her 😅

First up using `sin` to plot images along a sine wave with scoped custom properties

```
img {
translate: 0 calc(sin(var(--index) * 50%)); 👈
}
```

The `--index` could be inlined into the markup until we get `sibling-count/index` ✨

#css #html #design #webdev