home.social

#cssmask — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #cssmask, aggregated by home.social.

  1. Because someone hearted this old @codepen demo done with 2 radio buttons + their labels in a group and it made me notice the title still said "smooth transition Chromium only" - it's been working cross-browser since the summer of 2024! 🥳🎉🎇

    codepen.io/thebabydino/pen/Bad

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

  2. Missed this, made on the 1st of Jan on @codepen:

    ✨ Sliding border glow on hover for beveled cards, heavily commented codepen.io/thebabydino/pen/Eay

    Trivial if we have `corner-shape` support & even simpler with `border-area`. But here it's cross-browser.

    Detailed explanation of the Maths behind on Ko-fi/ Patreon. This way, you get to both become smarter and support my work so I can continue coding.

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

  3. Different `backdrop-filter` effect for navbar vs. its buttons - how would you get this result?

    Think about it for a little bit before checking my solution, which you can find on @codepen codepen.io/thebabydino/pen/NPr

    PS: I really wanted to make this #CSS only, even if SVG filters can do better.

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

  4. How would you create such a sliding glow effect on `:hover`? Trivial with `corner-shape`, but what about making it work cross-browser now?

    Think about it, then check my solution on @codepen codepen.io/thebabydino/pen/Eay

    Detailed explanation of the Maths behind (with drawings) on Ko-fi/ Patreon. This way you get to both become smarter and support my work so I can continue coding.

    #CSS #cssGradient #cssMask #coding #cornerShape #code #frontend #Maths #web #dev #webDev #webDevelopment #trigonometry

  5. Avatar border effect. Single `img` element (so no pseudos), minimal #CSS. Real transparency between actual image and border.

    Live on @codepen codepen.io/thebabydino/pen/RwK

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

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

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

    Inspiration x.com/avanderpotte/status/1923
    (via @codrops motion highlights roundup)

    cc @bramus

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

  7. #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.

    codepen.io/thebabydino/pen/BRR

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

  8. 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): codepen.io/thebabydino/pen/Pwo

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

  9. Made this loader codepen.io/thebabydino/pen/Bay 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

  10. #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: codepen.io/thebabydino/pen/MYg

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

  11. Over a decade ago, I made this single div tooltip on @codepen, but things have changed for the better on the web since, so here's an improved 2024 version codepen.io/thebabydino/pen/ALR

    Instead of aligning gradients of div & its pseudos, it's using #CSS #masking and a simple #SVG #filter.

    #cssGradient #svgFilter #cssMask #code #tooltip #roundedCorners #coding #frontend #web #webDevelopment #dev #webDev

  12. Simplest gradient border buttons (with border-radius) codepen.io/thebabydino/pen/vYo

    Multiple cases, each just a few lines of code:
    ✨ solid background
    ✨ (semi)transparent background
    ✨ (semi)transparent background for input[type=button] (so no pseudos allowed)

    #CSS #cssGradient #cssMask #masking #code #coding #frontend #web #dev #webDev #webDevlopment

  13. 1️⃣1️⃣ 446 ❤️ Pure #CSS 1 div card backgrounds codepen.io/thebabydino/pen/GRR

    Using mask compositing, which I explained in this article css-tricks.com/mask-compositin

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

    #mask #cssMask #cssGradient #pattern #cssPattern #singleDiv #code #coding #frontend #webDev #web #webDevelopment #dev

  14. 1️⃣1️⃣ 446 ❤️ Pure #CSS 1 div card backgrounds codepen.io/thebabydino/pen/GRR

    Using mask compositing, which I explained in this article css-tricks.com/mask-compositin

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

    #mask #cssMask #cssGradient #pattern #cssPattern #singleDiv #code #coding #frontend #webDev #web #webDevelopment #dev

  15. 1️⃣1️⃣ 446 ❤️ Pure #CSS 1 div card backgrounds codepen.io/thebabydino/pen/GRR

    Using mask compositing, which I explained in this article css-tricks.com/mask-compositin

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

    #mask #cssMask #cssGradient #pattern #cssPattern #singleDiv #code #coding #frontend #webDev #web #webDevelopment #dev

  16. 1️⃣1️⃣ 446 ❤️ Pure #CSS 1 div card backgrounds codepen.io/thebabydino/pen/GRR

    Using mask compositing, which I explained in this article css-tricks.com/mask-compositin

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

    #mask #cssMask #cssGradient #pattern #cssPattern #singleDiv #code #coding #frontend #webDev #web #webDevelopment #dev

  17. 1️⃣1️⃣ 446 ❤️ Pure #CSS 1 div card backgrounds codepen.io/thebabydino/pen/GRR

    Using mask compositing, which I explained in this article css-tricks.com/mask-compositin

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

    #mask #cssMask #cssGradient #pattern #cssPattern #singleDiv #code #coding #frontend #webDev #web #webDevelopment #dev