5 ms·
> Amusingly, tables came back. But they're called "layout tables" now, to avoid embarrassment. I'm not really sure what you're talking about. Tables were bad b
by _bxg1 8y ago
> Amusingly, tables came back. But they're called "layout tables" now, to avoid embarrassment.
I'm not really sure what you're talking about. Tables were bad because they were too rigid and weren't designed for layout purposes; they do still get used when you want to display an actual table. Maybe you meant CSS Grid?
> Trying to do 2D layout with 1D constructs (the "float" and "clear" era) was just silly.
The float era was certainly a dark time, and I'm glad I came into the field on the tail end of it. It was a hold-over from CSS' document-focused origins. Today we have flex-box, which quite elegantly serves 90% of people's layout needs, and CSS Grid which fills in the rest. For the record, flex-box is a 1D construct for doing 2D layouts, and it does the job fantastically.
Your Autodesk comparison belies a fundamental misunderstanding about the nature of the DOM - it is, to its great advantage, a 1D space which flows into a 2D shape. In fact, this was the great flaw with using tables for layout in the first place. By making the content fundamentally 2D, all it could do to respond to different screen sizes and different browser window resizes is stretch. But you don't actually want your layout to be totally percentage-based. You want your content to wrap and flow to make the best use of the available space that it can, with no assumptions about screen size or ratio. The web is 1D because text is 1D. As text flows in lines, within containers which may be different shapes and sizes, so does the entire document model. This is profoundly powerful. Modern CSS gives you the tools to make select aspects of your layout work differently - yes, even in 2D ways - but they're best used to shape and guide that fundamental flow instead of replacing it.
- rmetzler 8y ago> Tables were bad because they were too rigid and weren't designed for layout purposes; they do still get used when you want to display an actual table. And when you have to implement a email design someone gave you who think it’s more important to have it look a certain way then to implement it reliable.
- mattkevan 8y agoThat’s because the rendering engines in email software are crap, not due to a deficiency in CSS - I think Outlook still uses Word’s HTML renderer and even Gmail doesn’t support everything.
- worble 8y agoIn all fairness that's probably a good thing. God forbid if emails today were like the rest of the web, hijacking the scrollbar, constant popups to register, like and subscribe. I like my emails like I like my actual mail; text and maybe the odd image.
- pbhjpbhj 8y agoI've got to disagree. Your preference for text emails doesn't mean those who do want rich-text or HTML should have to put up with crappy rendering that requires specialist developers. I don't understand why HTML payloads can't just be loaded in a (streamlined) browser pane?
- mattkevan 8y agoAgreed. Rendering HTML and CSS in a vaguely standards-compliant way is surely a solved problem by now. Javascript should stay firmly blocked though.
- _bxg1 8y agoThey are; it just tends to be a really crappy browser pane that isn't based on (and therefore kept up to date with) any major browser, so writing the HTML and CSS is like being transported back to 2004
- mattkevan 8y agoDunno why Gmail doesn’t support everything. It’s in a modern browser already! https://templates.mailchimp.com/resources/email-client-css-support/ https://templates.mailchimp.com/resources/email-client-css-s...
- Semaphor 8y ago> hijacking the scrollbar, constant popups to register, like and subscribe. Those are JS related, I don't think anyone is asking for renderers to allow that. But proper CSS support would be nice.
- zeroname 8y ago> Your Autodesk comparison belies a fundamental misunderstanding about the nature of the DOM - it is, to its great advantage, a 1D space which flows into a 2D shape. What's the advantage? The screen is 2D space. Layouting is a 2D problem. Images are two-dimensional. It's simpler to start from 2D and make 1D content fit that space than the other way around. > The web is 1D because text is 1D. That made sense in the very early days of the web, now it's just a historical crutch. I fully understand why things are the way they are, but that's orthogonal.
- shaki-dora 8y agoHumans can only focus on a single thing at a time. As your focus goes through any content, it necessarily follows a 1D path. HTML, eint Text, is also one-dimensional. CSS, as said before, transfers this 1D information into the 2D representation on a scree, or a printout. Or it leaves it allone, or rearranges the 1D stream, for a different 1D representation to a screen reader. This has nothing to do with being a “historical artifact”. It’s a fundamental idea of communication theory. But maybe it helps you to see its value if I just mention that thinking a bit about such theory will make it far easier to you to create designs on the vastly different devices, from smart watches to Times Square screens connected too the internet now.
- zeroname 8y agohttps://en.wikipedia.org/wiki/Apophenia https://en.wikipedia.org/wiki/Apophenia
- hnaccy 8y agoThis one dimensional curve of focus throughout a 2D page will be different on each viewing and for different people. That's why the 2D layout is important because it can help assist or guide the creation of this path. For many pages there is no fixed "proper" path through the content even though the DOM is necessarily in some order.
- nnq 8y ago> As your focus goes through any content, it necessarily follows a 1D path No. Not at all. Almost never. Your brain is a chiefly parallel processing device, no matter how much you delude yourself that "you read text in the order it was written" and other such nonsense... It's widely known that this is not even how people read text. Even when you listen to music, and nothing is more 1D than sound, your brain chops it up and rearranges in multiple concurrent variants trying to "do the shazam thing" of identifying what else it may be even a bit similar to even if you don't realize it... "Following a 1D path" through content is what you do when you either want (1) to reliably communicate at the lowest imaginable common denominator with people with unknown and presumed low skill and intelligence (eg. "talk to a customer" or "talk to the bank teller") or with people so mentally different from you that they are close to being a different species (eg. "talk to an accountant or lawyer" or "send a binary encoded message to maybe be received and decoded by an alien civilization"), or (2) you actually want to force a particular interpretation of the sequence and causality of things to people (eg. "explaining history to people" or "telling an educational story" or "manipulating people" or... "selling stuff to people"). All the other communication, and more like the only part of interpersonal communication that I find interesting is non sequential, it's about working with information that can be rearranged in multiple equally valid sequences and interpretable in multiple possible causality graphs. Think maps and painting. Or a textual description of a stack of maps etc.. Or computer code as it actually gets executed on an even slightly parallel machine (not "as it stays written code in a text file", that's also a "lowest common denominator representation" bc human and computer brains are so different).
- ashish01 8y agoYou know your comment in hacker news is rendered as a table :)
- tripzilch 8y agoThe DOM is actually a tree. I'm not sure if it's correct to call that 1D. Similarly, the web is a graph, definitely not 1D. I'd even go as far to say the text on most webpages isn't even linear. It's either a tree (like this comment page) or a fragmented collection of text chunks. The webpage that strictly consists of one linear stream of text is very much the exception. And it also happens to be the exception that CSS never had problems with. What you seem to be saying is that paragraphs are 1D (which get wrapped and flowed in layout), therefore entire webpages are 1D (no) and therefore the web is 1D (definitely not). Or maybe you could say that most viewport representations, scrolling vertically, are 1D. In which case CSS should be the tool that converts the tree or graph of content into this semi-1D viewing representation. I agree that this mismatch is where CSS finds a lot of problems.