4 ms·
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
by taeric 12y ago
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?
- eru 12y agoLaTeX 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.
- taeric 12y agoRight, I had not meant to imply otherwise. It was an example where there is nothing forcing you to separate style from document. At least, not to my knowledge. Except, of course, for any paper you want to offer to get published somewhere that has a style file for you to use. Then, yes, you have to support that. :)
- rbehrends 12y ago> That is, to Spolsky's credit, the point of HTML being completely layout free is supposed to be the compelling feature. Except that it isn't. If you want to do anything entirely non-trivial, you have to annotate your HTML with classes and ids, and then hook into this using a complicated declarative language. But, at this point, there is no abstraction gain from <div class="floating_figure">...</div> over floating_figure(...) Functions are fine abstractions and nothing stops you from providing different implementations for different situations, and these implementations can again use abstractions to deal with a variety of output devices. Nothing here requires you to define layout specifics as part of the document [1]. Moreover, not all the world is just plain sequential text. There are mathematical formulas and syntax diagrams, for example. math.stackexchange.com falls back to Javascript (via MathJax) in order to display formulas; and Lout provides an excellent example of how one can specify the spatial relationships of syntax diagrams [2] while still abstracting over the implementation details (Lout is another functional layout/typesetting language). [1] Of course, in practice, the world is never so clean, and you can rarely ignore layout constraints entirely; anyone who has ever written a paper containing a non-trivial mathematical formula knows that. [2] http://i.imgur.com/huD07xc.png http://i.imgur.com/huD07xc.png
- deleted 12y ago[deleted]
- taeric 12y agoI said that was the point. Not that it succeeded at it. I fully acknowledge that it is broken all the time. However, if you want a loose control over the visual characteristics of a paragraph with some images, than the base html and css for floats gets the job done. Want columns? Yeah, you're screwed. Seriously, most of the headaches from css come from trying to get it to do things that were not goals for the designers of the language. This is not a bad thing. But to believe that a turing complete language would have been a panacea is dangerous. And likely wrong.
- saraid216 12y agoYes. That's why the IMG tag was added. Everything we have now is an outgrowth of wanting to wrap text around that IMG tag.
- baddox 12y agoIf HTML was still just hypertext, which is text organized with links to other text, then the separation of data from appearance makes sense. But we happen to use HTML and other web technologies to create complex long-lived applications that are much more than hypertext.
- dredmorbius 12y agoSeems to me that the answer is to provide a real applications development environment. Not to shoehorn ever more crap into browsers. I've called before for splitting Web functionality into several modes. I think it's fairly clearly the way to go, and is actually how development's been headed to a reasonable approximation for the past few years. 1. A reading / discussion oriented platform. The traditional browser, though with vastly better document management capabilities, and much simpler graphical presentation. Basically elecronic paper, similar to Pocket / Readability / Instapaper, or an eBook reader. 2. An applications development platform. Pretty much where the mobile space is now. There's Internet connectivity, and often Web elements. But what you get are freestanding apps. 3. Commerce. It's own space for security and privacy as well as function. You're seeing this with iTunes, the Play marketplace, and Amazon commerce apps. 4. Multimedia. Give me a freestanding player with its own queuing mechanisms. Again, pretty much the case on mobile. More: http://redd.it/256lxu http://redd.it/256lxu
- calinet6 12y agoHow are 2-4 not covered by every other applications development platform on desktop or any other platform?
- baddox 12y agoBecause no one application framework is already supported by the vast majority of Internet-capable devices, requires no "installing," and supports a standardized and ubiquitous system to link between applications.
- dredmorbius 12y agoWhat browser-based apps offer is a uniform platform for applications development. It's a HUGE revolution in applications space, and as much as it's frustrating to me (on both the user and developer/ops side), there's no denying its impact and significance. Supporting a zero-install or minimal-install path, supporting all platforms from the same runtime, and providing instant updates to all users is tremendous. It's a large part of what's made smaller Web ISVs (SaaS) possible. Systems integration and platform support kill applications design in other contexts. But those same features are also limitations. I've had multiple horrible app upgrades, apply massive amounts of styling to Web sites and apps, and _still_ run into compatibility issues, as a Linux user. And then there's the security profile. There are a number of compromises possible, but pulling the "applications runtime environment" out of my "information delivery tool" seems an increasingly positive step. Not that we haven't had attempts to provide that runtime, e.g., Java and ActiveX. One problem is that the runtime itself cannot run as the same UID as the user invoking it. It's got to be fully sandboxed and separated, further by origin site or authoring authority. Possibly within its own VM. Trust of Web content is a real problem and one that will only grow.
- hrktb 12y agoThe thing is HTML is not layout free if you use it as intended. For instance different layouts are defined for table, span or div tags. The same goes for presentation, where h1/h2/h3, input or select tags have a default presentation. You can override most of these defaults (some are still pretty hard to override), but it's still baked in; would your CSS be ignored or not loaded for any reason and you're back on the defaults. Cleanly separating data and presentation into HTML and CSS only works if you ignore all the semantic tags and use div everywhere. I personally gave up a long time ago on semantic html, that's not the opinion I hear the most. Either way, I think most people see HTML as base layer with data, presentation and baked in behaviors, and CSS and JS as a enhanced layer on top of that.
- eddieh 12y agoPresentation and semantics are not the same thing. All the default presentation is easy to override if you know what you're doing. CSS is pretty damn simple. You should learn the basics. Namely: cascading, specificity, nesting, inheritance, the _BOX_ model. If you think presentation and semantics are mutually exclusive then you're doing it wrong. Very wrong! The example you give about the default layout of elements can easily be changed using the display property: https://developer.mozilla.org/en-US/docs/Web/CSS/display https://developer.mozilla.org/en-US/docs/Web/CSS/display
- hrktb 12y agoOn a theorical point of view I agree with you. In practice there's a world of difference in presentation if you use the semantics for a select box or roll your own solution. In a way I am very intersted in what Google is doing with the material UI. They seem to be ditching native components to reimplement everything. Basic css is simple and fun. It gets hairy when you try anything mildly complex, and you start to learn magic spells when playing the "I made this screen in Photoshop, make it pixel with pixel perfect fidelity in HTML" game.