Remix.run Logo
kccqzy 2 hours 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 2 hours ago | parent | next [-]

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

krick an hour ago | parent | next [-]

Actually, they do, sort of. At least, if you use GLSL shaders. I remember some demo project using it in a way that made it appear that the website "sees" another window with the same website, which blew my mind when I saw it first. Cannot recall the name or anything else to locate it.

m0nhawk 13 minutes ago | parent [-]

My guess is that you’re remembering this demo: https://xcancel.com/_nonfigurativ_/status/172732259457002734...

krick 6 minutes ago | parent [-]

Yep, that's right.

fluoridation 2 hours ago | parent | prev [-]

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 an hour ago | parent [-]

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

dpkirchner 23 minutes ago | parent | next [-]

It's easy, you just need to hold your phone such that your eyes are pointed directly at the ads as they scroll up and down the screen. Thank you for consuming content.

giancarlostoro an hour ago | parent | prev | next [-]

The same way Steve Jobs said to hold the iPhone.

blamarvt an hour ago | parent | prev [-]

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

seg6 an hour ago | parent | prev [-]

The point of centering an element horizontally is to make sure that the content you’re viewing is directly in front of you. Browsers with a sidebar shift the content to the right, assuming the sidebar is on the left, which I’ve come to dislike! Others have expressed the same preference, hence this little snippet on my website.

stevage an hour ago | parent | next [-]

> The point of centering an element horizontally is to make sure that the content you’re viewing is directly in front of you.

That's an awfully big assumption. For starters, you're assuming that the browser window itself is centered on the screen, and that the device is centered in front of the user.

I don't think this is the point of centering an element horizontally at all, and the result you have created here is not at all what I as a user want.

nkrisc an hour ago | parent | prev | next [-]

Joke’s on you: my browser window isn’t centered.

scubbo 44 minutes ago | parent | prev | next [-]

I salute your dedication to understanding and fixing a problem that bothers you - but I must add my voice to those who think that this is not a good design for general use. The viewport is the region within which content should be positioned, and thus within which they should be centred. By your logic, left-aligned content in a browser with a left sidebar should be deliberately covered.

wat10000 29 minutes ago | parent | prev | next [-]

This all sounds like a really elaborate way of not taking advantage of the fact that modern windowing operating systems don't require windows to be full screen, and allow you to position the sides of your browser window wherever you want them to be.

wizzwizz4 an hour ago | parent | prev [-]

As a rule, you should not add functionality to a website to compensate for browser misfeatures. People who want the browser to work differently can get a different browser: that's why we call them "user agents". Making the web all complicated like this mainly serves to make it harder for people to use alternative browsers, or for browsers to change their misfeatures without breaking compatibility.

seg6 9 minutes ago | parent [-]

Fair enough, that criticism resonates. I've decided to keep this behaviour only in the extension and have reverted it from the blog. Thanks!