Live data from Hacker News

CSS is unnecessary given a layout language

pchiusano.github.io

21–30 of 183 posts

Re: CSS is unnecessary given a layout language

#21
I'm not really sure I understand what the point of this message is. The point of separation between CSS and HTML is not that "designers" are idiots. Nor is it that developers are poor designers. The idea is strictly to keep the data separate from any other concern. This is broken all of the time by all sorts of grid based elements and such. But the idea does seem decent, if a touch naive.

That is, to Spolsky's credit, the point of HTML being completely layout free is supposed to be the compelling feature. And it roughly works for basic documents. I'm actually convinced it could work decently for more complicated layouts if absolute positioning were more understood by developers and designers.

Are there better ways to go? Certainly. I'm particularly fond of the way that LaTeX gets things done. Though, that is far from a "safe" environment. (For example, you should probably never just up and run a .tex document on your computer without first scanning it yourself.) Also, it is worth noting that efforts are usually made to separate style from content there. (Not sure what the overall verdict is on those at the moment. But they do exist.)

At the end of the day, though, the dream is still a language where you can edit one file to change the way something looks on render, and another to change what it contains. Any language that lets you do both in one place will result in you doing both in one place. Such that it becomes very problematic to change the look of something without changing what is in it. And vice versa.

Right?

Re: CSS is unnecessary given a layout language

#22
post #17

I actually like CSS as it is now, and it's getting better ( cough , flexbox). Am I the only one who finds CSS incredibly hard to master, though? I've been writing CSS for years and I still feel like a newbie sometimes, and feel like I'm just tinkering with random attributes until it looks right.

Suppose you want to create the largest possible square div inside the rectangle of another div. Any layout language that can't let me satisfy such a simple and obvious layout constraint is a travesty. CSS will not let you do this, even with flexbox.

[deleted]

Re: CSS is unnecessary given a layout language

#23
Haven't looked at Elm. It may be the cat's pajamas.

But reading this article, I'm immediately reminded of all the marketing surrounding XAML a few years back. Not particularly enamored with the results there.

Poorly-done, abstraction actively gets in the way of combination. At some point, everyone has to agree on the same abstraction if they're gonna work together; enough of CSS has been widely implemented to allow folks to build on that, while plenty of other, richer, more powerful abstractions predate it, but were never widely agreed upon.

Re: CSS is unnecessary given a layout language

#24
The way we got here is interesting. In 1995, if you'd wanted to implement one of today's websites, you might have written a Tcl/Tk script that users could download and run. Tk solved pretty well all the problems people are talking about here in the 90s; it even had a safe mode for running untrusted scripts. But users in the 90s would have regarded as crazy any suggestion that they download and run random Tcl scripts from every site they visited! Lots of them turned off the early versions of Javascript, which couldn't do much apart from formatting tweaks.

Is the killer feature of CSS and Javascript simply that they undermined the frog's security assumptions so gradually that it stayed in the pot until it boiled?

Re: CSS is unnecessary given a layout language

#25
post #18
post #14

I really like the point about designers learning to program. It got me thinking that eventually many/most professionals may need a basic grasp of programming. Then it dawned on me; why not teach EVERYONE basic programming in school?!

What about accounting? Most professionals need a basic grasp of accounting.

Basic accounting should be taught.

Heck, teach basic cooking, basic construction, basic plumbing, basic engine repair. Chances are, you're gonna need a basic understanding of all of these eventually... And if nothing else, it's an opportunity to make some aspects of basic mathematics more obviously useful to kids who are struggling to stay interested.

Re: CSS is unnecessary given a layout language

#27
post #17

I actually like CSS as it is now, and it's getting better ( cough , flexbox). Am I the only one who finds CSS incredibly hard to master, though? I've been writing CSS for years and I still feel like a newbie sometimes, and feel like I'm just tinkering with random attributes until it looks right.

Suppose you want to create the largest possible square div inside the rectangle of another div. Any layout language that can't let me satisfy such a simple and obvious layout constraint is a travesty. CSS will not let you do this, even with flexbox.

Has anyone assembled a list of things such as this that CSS cannot do?

FlexBox always felt like it was a direct response to a few specific cases rather than a generalized gain in flexibility.

Re: CSS is unnecessary given a layout language

#28
post #24

The way we got here is interesting. In 1995, if you'd wanted to implement one of today's websites, you might have written a Tcl/Tk script that users could download and run. Tk solved pretty well all the problems people are talking about here in the 90s; it even had a safe mode for running untrusted scripts. But users in the 90s would have regarded as crazy any suggestion that they download and run random Tcl scripts…

TK finally got native looking skins in what, 8.5? Perhaps a set of attractive defaults combined with a cross platform package management system and we could have been talking.

That said, the web was easy for users. That makes all the difference.

Re: CSS is unnecessary given a layout language

#29
post #21

I'm not really sure I understand what the point of this message is. The point of separation between CSS and HTML is not that "designers" are idiots. Nor is it that developers are poor designers. The idea is strictly to keep the data separate from any other concern. This is broken all of the time by all sorts of grid based elements and such. But the idea does seem decent, if a touch naive. That is, to Spolsky's credit…

LaTeX separation of style from content is in-principle even looser than HTML vs CSS. TeX doesn't enforce the separation at all, and lots of old style TeX documents mix it with abandon. But the culture of LaTeX users embraces the separation.

Re: CSS is unnecessary given a layout language

#30
post #25
post #18

Earlier quoted context omitted.

What about accounting? Most professionals need a basic grasp of accounting.

Basic accounting should be taught. Heck, teach basic cooking, basic construction, basic plumbing, basic engine repair. Chances are, you're gonna need a basic understanding of all of these eventually... And if nothing else, it's an opportunity to make some aspects of basic mathematics more obviously useful to kids who are struggling to stay interested.

On that note, "Accounting for Computer Scientists" (http://martin.kleppmann.com/2011/03/07/accounting-for-comput...) is a nice introduction to the very basics. (It's a shame accounting has some much stamp collecting built in.)
Post reply on HN