home.social

#csswtf — Public Fediverse posts

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

  1. #CSSWTF The scrollbar is a part of which box?

    codepen.io/thebabydino/pen/LYK

    You would think

    `background: teal content-box`
    and
    `background: linear-gradient(teal 0 0) content-box`
    produce the same result. Except...

    `background: teal content-box` doesn't stretch under transparent scrollbar track

    `background: linear-gradient(teal 0 0) content-box` stretches under transparent scrollbar track

    #CSS #WTF #code #coding #frontend #scroll #web #dev #webDevelopment #webDev

  2. Extremely annoying #CSS gotcha: container query units seem to be relative to the `content-box` dimensions. And there doesn't seem to be any way to make them relative to the `border-box` dimensions... which is what I need to solve other problems caused by container queries. 😭

    #cssWTF #gotcha #layout #cssLayout #wtf #code #coding #containerQueries #containerQuery #frontend #webDev #webDevelopment

  3. #tinyCSStip (or #gotcha)

    If you use a vertical `writing-mode` and you also have a pseudo with some `content`, that `content`... may or may not be rotated, depending on its nature! 😼

    I'm not even kidding. And it's the same in every browser.

    #CodePen test codepen.io/thebabydino/pen/VwN

    #CSS #csswtf #wtf #writingMode #typography #textEffect #code #coding #frontend #webDev #webDevelopment

  4. In #CSS

    😵`grey` is darker than `darkgrey`
    😵`pink` is lighter than `lightpink`
    😵‍💫R channel at 255 with G & B at 0 is `red`, B channel at 255 with R &G at 0 is `blue`... but G channel at 255 with R &B at 0 is not `green`, it's `lime`!
    🥴`fuchsia` is `magenta`
    🥴`aqua` is `cyan`

    For real, see this page by @Meyerweb meyerweb.com/eric/css/colors/ (which I've been using for over a decade)

    A bit of history twitter.com/briankardell/statu

    #cssWTF #wtf #dafuq #code #coding #frontend #web #webDev #webDevelopment

  5. The !important things in life...

    (cannot for the life of me understand why some are 9999px and some are 99999px)

    ¯\_(ツ)_/¯

    #CSSWTF #CSS #coding #frontend #webDev #webDevelopment #bestPracticesLOL

  6. TIL twitter.com/SelenIT2/status/16

    The spec, though I don't understand what's written in there drafts.csswg.org/css-images-3/

    Meaning I can only get fixed constant thickness elliptic arcs only with two radial gradients, the second one being a cover for the inside of the ellipse.

    codepen.io/thebabydino/pen/bGO

    #CSS #CSSWTF #CodePen #CSSgradient #coding #frontend #webDev #webDevelopment

  7. Are you okay, Chrome DevTools?

    280x360 element. The padding is 24px in the normal state and 0px in the hovered state.

    I force the hovered state from DevTools. The result on the page looks fine, the computed value shows up as 0px. It's just the box model illustration that's WTF.

    #css #wtf #csswtf #devTools #devToolsWTF #chrome #coding #frontend #webDev #webDevelopment

  8. Making test cases for filing bugs at 4:30am because why not... 😭

    #css #csswtf

  9. Web dev in real life.

    This is not how I'm used `justify-content: space-between` works. There are no other properties other than `padding: 6px` set on the flex container or children.
    Flex container is a `div` and the children are a `ul` and a `p`.

    If I set `flex-grow: 1` just on the 1st child, I'm still left with a space on the right of the second one.

    The two gaps aren't even equal, the second one is bigger than the first.

    Losing it.

    #css #csswtf