13 comments

  • krick 3 minutes ago

    Screenshots would be helpful, because (you may be surprised to learn that) it is not entirely obvious which mode of behavior is supposed to be "wrong".

    Anyway, I wouldn't say it currently behaves nicely (like something I would like to reuse anywhere whatsoever). Tested on Firefox opening Bookmarks on the left. First off, there is this ugly flicker, as browser first renders the "wrong" version, then your JS "fixes" it. Second, there is some concurrency problem, as by opening and closing Bookmarks repeatedly I somehow managed to render both versions: centered to viewport and covered by sidebar.

    And, yeah, as others have said, I also think that allowing sidebar to cover your webpage content is absolutely bogus and don't foresee myself wanting this behavior, ever. But that's up to you.

  • kccqzy 40 minutes ago

    This might be some kind of a weird requirement for a piece of art, but I would literally never expect a website to center a div according to the browser window instead of the viewport. It just looks wrong and feels wrong.

      seba_dos1 30 minutes ago

      Same. Thank heavens the website doesn't know the position of the browser's window in respect to the screen it's on.

        fluoridation 24 minutes ago

        Wait until they realize that on mobile they can use accelerometer data to keep the element in the same position in space across translations of the device.

          jagged-chisel 16 minutes ago

          Wait, I have to hold my phone how in order to see the div? ಠ_ಠ

            blamarvt 10 minutes ago

            I assume you have to be facing the server...

  • crtasm 25 minutes ago

    Meanwhile this website has learned how to break mouse scrolling.

  • fluoridation 21 minutes ago

    I had no idea what this was talking about at first because I had JS blocked, so nothing special seemed to happen when I opened the bookmarks panel. This looks absolutely goofy. I don't know why you'd want the content potentially getting covered by unrelated UI elements.

      busymom0 12 minutes ago

      > This looks absolutely goofy. I don't know why you'd want the content potentially getting covered by unrelated UI elements.

      Here in Canada, the mobile website for anything related to Indian immigration (Indian passport, visa etc) is done via this absolutely goofy website with multiple levels of UI elements and popups covering the content. Have a look on mobile:

      https://www.blsindia-canada.com/ottawa-jurisdiction/index.ph...

  • skgough 31 minutes ago

    I think the scrollbar-gutter property helps with this. https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/P...

  • jszymborski 41 minutes ago

    margin:0 auto is the (probably incorrect) incantation I have always reached for

      sodapopcan 39 minutes ago

      That's fine but it only centres horizontally. Usually when people talk about "the div centring" they mean x and y, dead centre (as this article is).

  • josefrichter 43 minutes ago

    Centering a div? Impossible.