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

1️⃣2️⃣ 486 ❀️ Pure #CSS 1 div card backgrounds https://codepen.io/thebabydino/pen/GRRpzNX

Using mask compositing, which I explained in this @csstricks article https://css-tricks.com/mask-compositing-the-crash-course/

Another where I should go through the code and improve it as it can be simplified nowadays... a lot even!

#cssMask #code #coding #cssGradient #web #dev #webDev #webDevelopment #frontend

5️⃣ 850 β™₯️ No SVG, no image fluid slider https://codepen.io/thebabydino/pen/qByGqOm

#JS used only for
a) feature support detection
b) updating slider value in --val

Uses only
1 Γ— input[type=range] for actual slider
1 Γ— output for current value display
1 Γ— datalist for ruler

One of my best sliders on @codepen.

#CSS #slider #rangeInput #coding #web #dev #webDevelopment #webDev #code #frontend #cssGrid #cssMask #cssGradient

#tinyCSStip `clip-path` or `mask` are applied after `filter`.

This means we cannot clip/ mask, then add a `drop-shadow()` on the same element for the clipped/ masked shape.

We need to apply the `filter` on a parent of the clipped/ masked (pseudo-)element.

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

#CSS #filter #cssFilter #clipPath #clipping #cssClipPath #cssMask #coding #frontend #web #dev #webDev #webDevelopment #code

how to: drop shadow on clipped element

Doesn't work in Edge, sorry. But you can [vote for it here](https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/6519995-sup...

If what you want isn't beveled, but scooped corners, then you can do it with a `radial-gradient()` mask. You can even add borders too!

Here's a @codepen demo illustrating this https://codepen.io/thebabydino/pen/VYwObZN

Pure #CSS, no SVG.

#cssGradient #cssMask #coding #frontend #web #dev #webDev #webDevelopment #code

Scooped corners + border

...

Saw a @codepen demo using... a lot! of elements (screen 1) and quite a bit of #CSS to create a simple loader, so I forked it and made a 1 div version (screen 2) in under 30 CSS declarations (gradients, mask, variables to only change --c0 and --c1 values for 2nd loader): https://codepen.io/thebabydino/pen/PwoLJLR

#cssMask #cssGradient #conicGradient #maths #trigonometry #Sass #loader #web #dev #webDev #webDevelopment #code #coding #frontend #cssAnimation

1 div neon loaders

...

Pure CSS 1 div purple spinner/ loader

...

Made this loader https://codepen.io/thebabydino/pen/BayGjrq half a decade ago. Then it only worked in Chromium browsers with the Experimental Web Platform features flag enabled.

As of 2024, it works cross-browser, no flags needed. Since someone hearting it reminded me of its existence, updated support info.

#CSS #code #coding #frontend #web #webDev #dev #webDevelopment #mask #cssMask #cssGradient #conicGradient #cssVariables #cssAnimation

Pure CSS loader #19 - square rainbow dashes

As of July 2024, it works cross-browser, no flags needed. --- Needs [native `conic-gradient()` support](https://caniuse.com/#feat=css-conic-gradients...

Also, let me show you something: search result for "mask-clip mdn" vs. when actually going to the MDN page.

And no, `margin-box` doesn't work.

#css #cssMask #code #coding #frontend #web #dev #webDev #webDevelopment

#tinyCSStip

Ever want to mask something out of an element, but not cut out blur or box-shadow or a pseudo outside the element's border box?

Well, subtract whatever you want masked out from a fully opaque layer with `mask-clip` set to `no-clip`!

mask:
conic-gradient(red 0 0) no-clip subtract,
var(--masked-area)

@codepen demo: https://codepen.io/thebabydino/pen/MYggKre

#CSS #cssMask #code #coding #frontend #web #dev #webDev #webDevelopment

mask element without losing blur/ box-shadow/ pseudos outside border-box

...