Live data from Hacker News

A div that looks different in every browser

twitter.com

91–100 of 133 posts

Re: A div that looks different in every browser

#91
post #68

Earlier quoted context omitted.

It's pretty clear that Microsoft really took a close look at the specs when developing Edge, which is really nice. It also has the benefit of being the newest of the major engines.

Actually, much of the time it comes down to what bugs people report. In a closely related area, IE and Edge both added spread distance rather than subtracting it on inner box-shadows until I reported it last year, then it was fixed in IE within a month: https://developer.microsoft.com/en-us/microsoft-edge/platfor... . In this particular case, they may have got the best of it because IE didn’t support outline-offset a…

(Correction: fixed in Edge within a month; IE doesn’t get such fixes. Also “IE and Edge both” should read “both IE and Edge” for increased clarity.)

Re: A div that looks different in every browser

#92
post #31

Earlier quoted context omitted.

This isn't really a spec thing. Its more a manifestation of undefined behavior. Even c++ compilers have undefined behavior.

Especially C++ compilers have undefined behavior

You're using the words wrong. The code may have undefined behaviour.

For example, a race condition is an UB. Compiler won't invent locks that were not specified by the programmer in a code with some raw threads. As a result, CPUs will trash the memory.

Re: A div that looks different in every browser

#93
post #2

On one hand I think this is really neat. On the other this is why I have never taken front end development seriously enough to spend any real time learning it [0]. From the get go it always seemed like the rules were arbitrary and involved lots of guessing to get things right. I know this isn't actually true but it felt true enough early on to poison my mind to it. [0] Not something I'm proud of and I know front end…

" I know this isn't actually true " It's true. A confluence of vague definitions, poor implementations, bad documentation ... and this is the web we have. It's the tip of the iceberg, and the painful life of anyone doing html5 work, it's 'not fun' for anyone who's been exposed to regular programming because the problems you spend your day solving mostly should not be problems to begin with.

I agree. I recently started learning front end development. My reaction after grasping what modern frameworks do is “my god, what have we done?” It seems like we’ve expended a huge amount of effort to hack the web into something we can build SPAs in (and what an insightful TLA that is).

I wonder if this sort of situation was inevitable or, given sufficient coordination and standardisation, we could have built a better platform. There are some problems that would have to be overcome regardless (eg arbitrary display size[1]) but languages like CSS and JavaScript look like very bad decisions.

My first instinct is that a new platform should be developed based as far as much as possible on tried and tested languages and technologies, but one that also allows for fast-paced browser dev and a path for future evolution.

For now I’m just embracing it and learning. It’s a lot of fun to see how the web works nowadays - I’m already beginning to understand some of the types of bugs that sites exhibit, and why designs are as they are. One of the outcomes has been to develop serious respect for the developers of MS and Google Web apps - eg OneNote on the web - as what they’ve achieved is pretty miraculous when you consider the stack. And those poor web browser devs!

[1] the idea of allowing arbitrary dimensions displays is a very strange one if you consider traditional graphic design; this may be an instance of us geeks making decisions that don’t make sense to more experienced professionals from other backgrounds. How much did graphic designers, UX experts, psychologists etc impact the evolution of the web standards? I don’t know.

Re: A div that looks different in every browser

#94
post #42
post #40

Earlier quoted context omitted.

You should not be centering things in HTML, that's the stylesheet's job.

I have no objection to having a style sheet that defines what the tag does. But it should at least be possible to have a center tag and a vertical-center tag. AFAICT it is not possible. At the very least you need both a center-capable container and centered elements.

I don't think it should:

You're always centering children with respect to something, and you specify the fact that you want children centered on the thing you're centering them in, rather than the elements themselves. This makes more sense, in my opinion, and as said in the sibling comment, it's two simple rules.

I do a tonne of flexbox and grid in my day-to-day, and these complaints are quite simply out of date. Almost any layout in CSS these days can be done easily and intuitively.

Re: A div that looks different in every browser

#95
post #71

Earlier quoted context omitted.

https://codepen.io/anon/pen/NzQQJm This is a gross abuse of html, but if you really want that syntax, you can have it. I can't say I understand all the complaining here. You want to make $200K a year sitting at a desk, but learning flexbox or googling when you need it is too much effort?

Your code breaks the tag: if you try to nest a inside your it doesn't work. And my complaint is that I believe that computing should be accessible to everyone, and that simple things should not be made difficult just so that an elite guild can command above-market wages to fix problems that they themselves created. I don't believe in broken-windows economics.

Fixed: https://codepen.io/anon/pen/ZjzWzQ

Re: A div that looks different in every browser

#96
post #45

Earlier quoted context omitted.

But in c++ when there's undefined behavior, the spec specifically says there's undefined behavior. It doesn't sound like the spec is specifically saying there's undefined behavior in this case.

Is omitting a specification of undefined behavior the sane thing to do, though? I was thinking that "undefined behavior" in a spec is a serious misnomer. It's paradoxical if anything is defined as undefined , and it lets you confuse it with actually undefined behavior. If something is in the spec as undefined behavior, it's my understanding it could legitimately lead to, say, global thermonuclear war. No guarantees.…

Undefined behavior exists in a spec for efficiency reasons. For example, accessing an out of bound index in C remains undefined as Having the runtime check boundaries on every index access is an inefficiency reserved for less efficient language specs like python.

Rust aims to solve these problems with something called zero cost abstractions.

Re: A div that looks different in every browser

#97
post #32

Earlier quoted context omitted.

The code shown on that page actually doesn't work, though the code in the github repo does. And this exposes the problem with the current state of the art: yes, you can probably get flexbox to do what you want [@] if you know how. But if you don't know how, trying to figure it out is still very hard. You should be able to write: stuff or stuff There is really no reason that should not Just Work. (The tag has worked f…

https://codepen.io/anon/pen/NzQQJm This is a gross abuse of html, but if you really want that syntax, you can have it. I can't say I understand all the complaining here. You want to make $200K a year sitting at a desk, but learning flexbox or googling when you need it is too much effort?

Brain fuck has pretty simple syntax too yet nobody wants to code in it because its trashy and inelegant.

Im tired of programmers who've become experts in building structures by ramming screws into wood with a hammer claiming that all is well with the world when you have powerful hammers and screws.

I think we have a whole generation of front end programmers who haven't seen a screw driver.

Re: A div that looks different in every browser

#98
post #94
post #42

Earlier quoted context omitted.

I have no objection to having a style sheet that defines what the tag does. But it should at least be possible to have a center tag and a vertical-center tag. AFAICT it is not possible. At the very least you need both a center-capable container and centered elements.

I don't think it should: You're always centering children with respect to something, and you specify the fact that you want children centered on the thing you're centering them in, rather than the elements themselves. This makes more sense, in my opinion, and as said in the sibling comment, it's two simple rules. I do a tonne of flexbox and grid in my day-to-day, and these complaints are quite simply out of date. Alm…

By out of date do you mean around 1 year old? I'm sorry but your statement will likely be out of date soon.

Re: A div that looks different in every browser

#100
post #2

On one hand I think this is really neat. On the other this is why I have never taken front end development seriously enough to spend any real time learning it [0]. From the get go it always seemed like the rules were arbitrary and involved lots of guessing to get things right. I know this isn't actually true but it felt true enough early on to poison my mind to it. [0] Not something I'm proud of and I know front end…

Forcing the DOM, JS and CSS was a mistake. The problem was that you couldn't have alternatives. wasm is going to disrupt front end by allowing you to have a strong typed language that you can use to build your own framework like the good ol' days.

Still gotta deal with the dom though. They need a root pixel level api to be made in conjunction to wasm, so people can restart from scratch.
Post reply on HN