home.social

#cssgradient — Public Fediverse posts

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

fetched live
  1. That is, we need to add:
    i*2*α_dx

    If k > 1, then we need to add half a turn as well, that is:
    round(down, k)*180°

    Adding these to the angular progress along the edge, we get the conic-gradient angle producing a point that moves at constant speed along the perimeter.

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

  2. That is, we need to add:
    i*2*α_dx

    If k > 1, then we need to add half a turn as well, that is:
    round(down, k)*180°

    Adding these to the angular progress along the edge, we get the conic-gradient angle producing a point that moves at constant speed along the perimeter.

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

  3. If progress at the bottom left corner (= at half the perimeter starting from the top right corner) is 1, then progress at the bottom right corner is the height 100cqh over half the perimeter (one height 100cqh plus one width 100cqw):

    f = 100cqh/(100cqh + 100cqw)

    Dividing lengths is supported by Safari & Chrome + we have a Firefox fallback frontendmasters.com/blog/count

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

  4. If progress at the bottom left corner (= at half the perimeter starting from the top right corner) is 1, then progress at the bottom right corner is the height 100cqh over half the perimeter (one height 100cqh plus one width 100cqw):

    f = 100cqh/(100cqh + 100cqw)

    Dividing lengths is supported by Safari & Chrome + we have a Firefox fallback frontendmasters.com/blog/count

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

  5. Anyway, what we want to animate here linearly isn't a conic-gradient() angle, it's the progress around the perimeter.

    This is k, going from 0 to 2. When k is 0, we're at the top right corner. When it's 1, we're at the bottom left corner, having gone across half the perimeter.

    What about the progress value at the bottom right? We'll be calling that f, but how much is it?

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

  6. Anyway, what we want to animate here linearly isn't a conic-gradient() angle, it's the progress around the perimeter.

    This is k, going from 0 to 2. When k is 0, we're at the top right corner. When it's 1, we're at the bottom left corner, having gone across half the perimeter.

    What about the progress value at the bottom right? We'll be calling that f, but how much is it?

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

  7. On gradient borders & common issues with them reddit.com/r/css/comments/1tfm

    If you've ever wanted to create constant length/ speed border segments on non-square boxes, the how behind the mathy, less code + working with border-radius solution & the stacked children solution (no border-radius).

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

  8. On gradient borders & common issues with them reddit.com/r/css/comments/1tfm

    If you've ever wanted to create constant length/ speed border segments on non-square boxes, the how behind the mathy, less code + working with border-radius solution & the stacked children solution (no border-radius).

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

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

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

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

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

  13. Torn on @codepen: codepen.io/thebabydino/pen/XWQ

    Absolutely no text duplication whatsoever, not in the markup, not in the `content` of any pseudo. No images save for the "newspaper" background (which doesn't include the torn edges, screen #2) and for #CSS gradients.

    Just some #SVG #filter magic! 🪄✨

    #svgFilter #cssGradient #textEffects #code #textEffect #coding #frontend #web #dev #webDevelopment #webDev

  14. Torn on @codepen: codepen.io/thebabydino/pen/XWQ

    Absolutely no text duplication whatsoever, not in the markup, not in the `content` of any pseudo. No images save for the "newspaper" background (which doesn't include the torn edges, screen #2) and for #CSS gradients.

    Just some #SVG #filter magic! 🪄✨

    #svgFilter #cssGradient #textEffects #code #textEffect #coding #frontend #web #dev #webDevelopment #webDev

  15. Multilayer candy effect with no text duplication. In fact, this is contenteditable, no JS required 🐱

    Check out the live demo on @codepen codepen.io/thebabydino/pen/XWO

    Just a bit of #SVG #filter magic! 🪄✨

    #svgFilter #cssGradient #code #coding #web #dev #webDev #webDevelopment #CSS #frontend #textEffect #textEffects

  16. Multilayer candy effect with no text duplication. In fact, this is contenteditable, no JS required 🐱

    Check out the live demo on @codepen codepen.io/thebabydino/pen/XWO

    Just a bit of #SVG #filter magic! 🪄✨

    #svgFilter #cssGradient #code #coding #web #dev #webDev #webDevelopment #CSS #frontend #textEffect #textEffects

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

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

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

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

  21. If you're a Cheetah+ supporter on Ko-fi or Patreon, then first of all thank you 🙏 and second, I've just published something detailing how to easily get halftone-masked images with blend modes and filters.

    ❇️ ko-fi.com/post/Halftone-maskin

    ❇️ patreon.com/posts/halftone-mas

    #CSS #filter #SVG #blendMode #cssFilter #svgFilter #halftone #coding #frontend #web #dev #webDev #webDevelopment #code #cssGradient

  22. If you're a Cheetah+ supporter on Ko-fi or Patreon, then first of all thank you 🙏 and second, I've just published something detailing how to easily get halftone-masked images with blend modes and filters.

    ❇️ ko-fi.com/post/Halftone-maskin

    ❇️ patreon.com/posts/halftone-mas

    #CSS #filter #SVG #blendMode #cssFilter #svgFilter #halftone #coding #frontend #web #dev #webDev #webDevelopment #code #cssGradient

  23. Another text effect on @codepen: codepen.io/thebabydino/pen/ZEZ

    No text duplication whatsoever, no part of the effect baked into the font, no images save for the CSS gradient backdrop, no JS.

    All done with #SVG #filter magic 🪄✨ - can you figure out how before checking the code?

    #svgFilter #css #code #coding #frontend #textEffect #textEffects #cssGradient #web #dev #webDev #webDevelopment

  24. Another text effect on @codepen: codepen.io/thebabydino/pen/ZEZ

    No text duplication whatsoever, no part of the effect baked into the font, no images save for the CSS gradient backdrop, no JS.

    All done with #SVG #filter magic 🪄✨ - can you figure out how before checking the code?

    #svgFilter #css #code #coding #frontend #textEffect #textEffects #cssGradient #web #dev #webDev #webDevelopment

  25. Outer + inner border for hue ring - 3 methods with a single div, no pseudos, all described in this public Ko-fi post: ko-fi.com/post/Outer--inner-bo

    Live demo on @codepen codepen.io/thebabydino/pen/RNr

    Best part? In practice, you'll need to use more than one because none works cross-browser.

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

  26. Outer + inner border for hue ring - 3 methods with a single div, no pseudos, all described in this public Ko-fi post: ko-fi.com/post/Outer--inner-bo

    Live demo on @codepen codepen.io/thebabydino/pen/RNr

    Best part? In practice, you'll need to use more than one because none works cross-browser.

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

  27. Split text with blended half shadow on @codepen codepen.io/thebabydino/pen/LYv

    No text duplication whatsoever, no images other than #CSS gradients, no funky fonts* - all done with #SVG #filter magic! 🪄✨

    *font used here is fonts.google.com/specimen/Rubi - you can see the effect isn't baked into it

    #svgFilter #cssGradient #code #coding #web #dev #webDev #webDevelopment #textEffect #textEffects #frontend

  28. Split text with blended half shadow on @codepen codepen.io/thebabydino/pen/LYv

    No text duplication whatsoever, no images other than #CSS gradients, no funky fonts* - all done with #SVG #filter magic! 🪄✨

    *font used here is fonts.google.com/specimen/Rubi - you can see the effect isn't baked into it

    #svgFilter #cssGradient #code #coding #web #dev #webDev #webDevelopment #textEffect #textEffects #frontend

  29. Retro 3D 🍫🦋 effect on @codepen: codepen.io/thebabydino/pen/bGy

    No text duplication whatsoever, no long shadow list, no funky fonts, no JS, no images other than CSS gradients. Extrusion is all #SVG #filter magic 🪄✨ - as illustrated by the recording below including the DevTools panel.

    #svgFilter #textEffects #textEffect #extrude #extrusion #code #coding #frontend #CSS #web #dev #webDev #webDevelopment #cssGradient

  30. Retro 3D 🍫🦋 effect on @codepen: codepen.io/thebabydino/pen/bGy

    No text duplication whatsoever, no long shadow list, no funky fonts, no JS, no images other than CSS gradients. Extrusion is all #SVG #filter magic 🪄✨ - as illustrated by the recording below including the DevTools panel.

    #svgFilter #textEffects #textEffect #extrude #extrusion #code #coding #frontend #CSS #web #dev #webDev #webDevelopment #cssGradient

  31. Options for fading an element's background image:

    a - if the backdrop behind the element is solid

    b - if the backdrop behind the element is another image

    Another 2 in 1 #CSS demo on @codepen codepen.io/thebabydino/pen/NPx

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

  32. Options for fading an element's background image:

    a - if the backdrop behind the element is solid

    b - if the backdrop behind the element is another image

    Another 2 in 1 #CSS demo on @codepen codepen.io/thebabydino/pen/NPx

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

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

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

  35. Remake of an old, old @codepen animation with 2025 #CSS codepen.io/thebabydino/pen/jOZ

    Now using `conic-gradient()` + `mask` instead of an SVG segments ring image. CSS `grid` for layout. Container query units so ring sizes adapt to number of rings (passed to CSS via a var) & available space. And more, check it out! 🐱

    Original code preserved in Pen description for web history.

    #conicGradient #cssGradient #code #coding #frontend #cssGrid #cssLayout #web #dev #webDev #webDevelopment #containerQueries

  36. Remake of an old, old @codepen animation with 2025 #CSS codepen.io/thebabydino/pen/jOZ

    Now using `conic-gradient()` + `mask` instead of an SVG segments ring image. CSS `grid` for layout. Container query units so ring sizes adapt to number of rings (passed to CSS via a var) & available space. And more, check it out! 🐱

    Original code preserved in Pen description for web history.

    #conicGradient #cssGradient #code #coding #frontend #cssGrid #cssLayout #web #dev #webDev #webDevelopment #containerQueries