home.social

#csstrick — Public Fediverse posts

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

fetched live
  1. #tinyCSStip As I just saw this in a '24 tutorial to make an absolutely positioned pseudo extend `8px` outside its parent in all directions.

    ❌ DON'T 🙀
    width: 100%; height: 100%;
    left: 50%; top: 50%;
    translate: -50% -50%;
    padding: 8px

    ✅ DO 😼 (1 declaration, not 6)
    inset: -8px

    Notes:
    ✨ yes, there are still valid use cases for `position: absolute` pseudos instead of `grid`
    ✨ no, that `padding` wasn't relevant later

    #css #cssTrick #cssTip #code #coding #frontend #web #webDev #dev #webDevelopment

  2. #tinyCSStip As I just saw this in a '24 tutorial to make an absolutely positioned pseudo extend `8px` outside its parent in all directions.

    ❌ DON'T 🙀
    width: 100%; height: 100%;
    left: 50%; top: 50%;
    translate: -50% -50%;
    padding: 8px

    ✅ DO 😼 (1 declaration, not 6)
    inset: -8px

    Notes:
    ✨ yes, there are still valid use cases for `position: absolute` pseudos instead of `grid`
    ✨ no, that `padding` wasn't relevant later

    #css #cssTrick #cssTip #code #coding #frontend #web #webDev #dev #webDevelopment

  3. Adapter la font-size (et plein d'autres choses) avec `clamp` en CSS, tu connaissais ?

    developer.mozilla.org/en-US/do

    #csstrick

  4. RT Konstantin Denerz
    Create a CSS-based holographic card ✨ using this simple trick from my @CodePen.
    ✅ Mask-Image 🎭
    ✅ Linear-Gradient 🌈
    🔗 codepen.io/konstantindenerz/pe
    Inspiration: twitter.com/drawsgood/status/1
    #css #animation #csstrick #holocard t.co/PY95qOibLJ
    <div class="rsshub-quote">
    Drawsgood: Throwback Tuesday to this holographic card made in @rive_app
    Check it out in the community here: rive.app/community/3515-7963-h t.co/TbYlSjouVs
    </div>
    :sys_twitter: twitter.com/kdenerz/status/164

  5. RT Konstantin Denerz
    Create a CSS-based holographic card ✨ using this simple trick from my @CodePen.
    ✅ Mask-Image 🎭
    ✅ Linear-Gradient 🌈
    🔗 codepen.io/konstantindenerz/pe
    Inspiration: twitter.com/drawsgood/status/1
    #css #animation #csstrick #holocard t.co/PY95qOibLJ
    <div class="rsshub-quote">
    Drawsgood: Throwback Tuesday to this holographic card made in @rive_app
    Check it out in the community here: rive.app/community/3515-7963-h t.co/TbYlSjouVs
    </div>
    :sys_twitter: twitter.com/kdenerz/status/164