4 ms·
> 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 s
by 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).
- CiaranMcNulty 8y ago> What's the advantage? The same content reflows to different 2D spaces
- zeroname 8y agoFlow-like layout is just a sub-problem of 2D Layouting. Having it as the only way to do layouting (besides tables) has proven a nightmare to work with. That's why you got Flexbox (and now Grid).
- _bxg1 8y agoFlexbox is a layout system for 1D content. CSS Grid is for 2D content, but it's designed in such a way that it can remain responsive to different container sizes, unlike <table>. This actually makes it pretty complicated and unwieldy, because - once more for the people in the back - doing a responsive layout in explicitly 2D terms is a very weird thing to be doing and usually isn't what you actually want.
- zeroname 8y ago> Flexbox is a layout system for 1D content. An individual flexbox container is one dimensional. To get a 2D layout, you nest rows and columns. > ...doing a responsive layout in explicitly 2D terms is a very weird thing to be doing and usually isn't what you actually want. I have no idea how you would come to that conclusion. To me, a "responsive" layout is one that adapts to the viewport size. The viewport is 2D. This is a 2D layouting problem. A subset of that problem is concerned with fitting content of a fixed viewport width to a variable height, i.e. your classic web site. That's what you may call "1D content". Once you're trying to get a layout that adapts to both viewport width and height (i.e. an ordinary application), CSS can get quite ugly.
- _bxg1 8y ago> a "responsive" layout is one that adapts to the viewport size Precisely. More often than not, accomplishing this requires more than just squishing and stretching. Panes have to wrap around at certain points and the layout has to shift. You can do this with a bunch of special cases, but the better way is to let the rules of flow work for you. For example, you can have a flex child "grow to fill available space but have minimum size", so that if less than that minimum size is available it wraps around to the next line. You want to talk about your layout in terms of a series of sections, not a fixed grid. This was impossible with <table>; CSS Grid provides tools for special-casing these things, but it's still way more obtuse than letting them occur naturally.