• chisel@piefed.social
    link
    fedilink
    English
    arrow-up
    33
    arrow-down
    2
    ·
    2 days ago

    It’s a few lines of css, no JS required.

    .my-div:hover {
      overflow-x: scroll;
    }
    

    And the look and feel of the scrollbar is generally determined by the browser/OS. Unless someone does a custom scrollbar implementation, but that is exceedingly rare. So that thin rounded gray bar is a browser/OS design, again, without any JS.

      • chisel@piefed.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        14 hours ago

        Oh, interesting, that’s pretty new. Technically it’s not an official part of the W3C spec yet, but it’s close enough that browsers support it now. Though, it only allows you to control the bar color, track color (which is generally invisible nowadays, so track color changes nothing), and width. So, yes, more customization than was there before, but still extremely minimal.

    • 0ops@piefed.zip
      link
      fedilink
      English
      arrow-up
      6
      ·
      2 days ago

      I don’t know about scrollbars specifically, but apparently a lot of windows 11 is written in react