http://jsfiddle.net/mBBJM/2155/
Not that it's any less Stockholm-Syndrome-y than the linked article's solution, but still, I have no clue why this is on the front page of HN.
31–40 of 62 posts
http://jsfiddle.net/mBBJM/2155/
Not that it's any less Stockholm-Syndrome-y than the linked article's solution, but still, I have no clue why this is on the front page of HN.
The fact that this is an interesting article is a huge indictment of CSS. It was developed for a different, simpler use case, and it's obviously the wrong abstraction at this point. Too bad it's entrenched.
I've been saying this of JS/HTML/CSS for years, but people seem to suffer from severe stockholm syndrome.
Vertical centering isn't that useful when you already have to know the height of things... I mean, if you already know the heights, you can just put the numbers in straight. The best way to do real vertical-centering that works with variable heights, and doesn't use JavaScript, is to take advantage of the fact that table cells do this with "vertical-align: middle". Inexplicably, only table cells allow true vertical c…
Earlier quoted context omitted.
CSS is not great for its original use case. It was poorly designed by a group of people who chose to ignore existing understanding of layout models. The TeX boxes+glue model, had it been adapted for CSS, would have made all the absurdities and nasty layout workarounds of the last 20 years unnecessary.
> It was poorly designed by a group of people who chose to ignore existing understanding of layout models. Can you please elaborate how tables were the understanding of layout models 15 years ago? The web was not thought to be interactive at that era, but to be printed, it's not the fault of the old specs that the web progressed significantly fast.
(1) The "H" in HTML stands for hypertext. (2) When has a web page ever printed well?
Earlier quoted context omitted.
CSS is not great for its original use case. It was poorly designed by a group of people who chose to ignore existing understanding of layout models. The TeX boxes+glue model, had it been adapted for CSS, would have made all the absurdities and nasty layout workarounds of the last 20 years unnecessary.
I like to point to the failure of keeping table headers visible at the top of a page as you scroll down a table. If I had a book where a table spanned multiple pages and the header row wasn't included at the top of the page, I would throw the book out. A scrollable table with fixed headers is something that Visual Basic supported in 1997.
Of course it wasn't a use case of interest to the mighty browser vendor cabal so it has never been considered a priority. It does seem like it will be possible soon though with position:sticky https://air.mozilla.org/intern-presentation-ford/
We should probably prepare some sacrifice to the browser vendor gods to thank them for this small morsel they have thrown us.
Earlier quoted context omitted.
Do you have a better suggestion? I agree with your frustration about this article being newsworthy (it's 2013! How are we still figuring out vertical centering?!), though I would argue that CSS is great for its original use case and certainly has its place today. Why is it bad that CSS is entrenched in the Web? Like any development technology, CSS has a learning curve and has several shortcomings (like vertical posit…
CSS is not great for its original use case. It was poorly designed by a group of people who chose to ignore existing understanding of layout models. The TeX boxes+glue model, had it been adapted for CSS, would have made all the absurdities and nasty layout workarounds of the last 20 years unnecessary.
CSS did borrow concepts from TeX at the time. I agree with you that if it had borrowed more from TeX maybe we would have avoided Javascript and also we would have benefited from an updated model for TeX and I said so at http://tex.stackexchange.com/a/6463/963.
Maybe is time to revisit and revamp both.
The fact that this is an interesting article is a huge indictment of CSS. It was developed for a different, simpler use case, and it's obviously the wrong abstraction at this point. Too bad it's entrenched.
CSS makes life much, much easier.
Earlier quoted context omitted.
I've been saying this of JS/HTML/CSS for years, but people seem to suffer from severe stockholm syndrome.
What do you suppose we do about it? Like it or not, people use web browsers to access the Internet, and as long as web browsers render HTML and CSS, we have to use the tools we have.
Pragmatically: I suppose that we embrace CSS/HTML/JS as object code. And I mean this in a much more dramatic way than CoffeeScript or SASS. This is finally starting to happen, thanks to browser support for things like source-maps. This is one reason I contribute to ClojureScript!
Idealistically: We should be pushing for lower level platforms for code distribution and execution, as well as host platform integration. Portable Native Client and similar efforts shouldn't be so controversial.
The fact that this is an interesting article is a huge indictment of CSS. It was developed for a different, simpler use case, and it's obviously the wrong abstraction at this point. Too bad it's entrenched.
I've been saying this of JS/HTML/CSS for years, but people seem to suffer from severe stockholm syndrome.