News for hackers. Stuff that matters.
Re:Incomplete List of Mistakes in the Design of CSS by Turing_Machine on Monday October 26, 2015 @05:42PM (#10454691)
The whole idea of using (at least) three separate languages (HTML, JavaScript, CSS) would seem weird if it were proposed de novo.

Consider that LaTeX manages to carry out all of those functions (layout, styling, and computation) using only one language.

Re:Incomplete List of Mistakes in the Design of CSS by A_COMPUTER on Tuesday October 27, 2015 @02:31AM (#10456597)
XML to the rescue! The alternate future of the web! XML + XSLT (stylesheet)-> XSL:FO (intermediate XML language for formatting) -> FOP (program to convert formatting objects to output) -> rendered format. XML all the way down! (One mistake, zero output.)
Re:Incomplete List of Mistakes in the Design of CSS by wodenokoto on Monday October 26, 2015 @07:34PM (#10455240)
In your latex equation, you are missing where the data goes. The idea for html/css/js is that data goes into the html, layout and styling into CDs and interactivity is defined in JavaScript.

That makes sense. The problem is that we never got anything close to that.

Re:Incomplete List of Mistakes in the Design of CSS by TheOtherHobbes on Monday October 26, 2015 @08:48PM (#10455493)
The problem is it doesn't really make sense in 2015.

Or rather, it only makes sense if you accept the technical debt inherited from HTML, which is itself the simplified stepchild of SGML, which was a 1960s idea and firmly rooted in paper publishing.

Separating content and presentation isn't a bad idea. The badness happened because JavaScript - or some other web programming language - didn't appear until HTML was established. So instead of a generic object model, with tagged content containers linked to an updatable library of presentation and layout code that could be standardised and refined continuously, some semi-standard version of a sort-of-working layout library was pre-compiled into browsers and accessed through a not very coherent DSL.

This made it fast enough to be usable - a very good thing, given 1990s processing speeds - but it also made it much harder to develop and fix.

In 2015 CSS shouldn't really be necessary. So much layout and presentation is done with JavaScript anyway that it would make just as much sense to get rid of CSS and extend and standardise on something like jQuery-but-better to create an evolving cacheable layout library that bypasses browser quirks and uses exactly one common versioned codebase.

This might seem ambitious, but writing good code that works across all common browsers now is such a nightmare for everyone that too many devs are either not bothering, or their bosses are telling them not to bother because it's too expensive.

As a user, I keep finding sites that simply don't work in Chrome or Safari or IE or whatever. That's not good, especially when there's a business at the other end trying to sell things.

I don't doubt the web will creak along, and some people will do amazing things. But it's still frustrating when it could be simpler, more standardised, more consistent, and much more reliable.

Re:Incomplete List of Mistakes in the Design of CSS by lenish on Tuesday October 27, 2015 @03:26AM (#10456702)
> So much layout and presentation is done with JavaScript anyway that it would make just as much sense to get rid of CSS and extend and standardise on something like jQuery-but-better to create an evolving cacheable layout library that bypasses browser quirks and uses exactly one common versioned codebase.

The concept of executing untrusted code is entirely antithetical to security. Javascript, or any Turing complete language, or perhaps that even is too precise a constraint, is a remarkably bad idea for setting the style of anything that is otherwise static. There's no good reason that text and images need be stylized via a proper language rather than static, non-executable statements.

> As a user, I keep finding sites that simply don't work in Chrome or Safari or IE or whatever.

I keep finding sites that simply don't work at all in Firefox with NoScript. Many of those sites are primarily just text and images which don't display otherwise. It's completely insane from a security point of view.

Re:Incomplete List of Mistakes in the Design of CSS by gopowerranger on Monday October 26, 2015 @09:06PM (#10455578)
As a web dev of 11 years, I don't find writing cross browser code a nightmare. And any web site that doesn't work cross browser is by amateurs at best.

I don't know what web sites you visit where you have such issues but I haven't seen them in years except for the occasional goofball site.

Re:Incomplete List of Mistakes in the Design of CSS by Ygg2 on Monday October 26, 2015 @11:15PM (#10456084)
As someone that had to support IE6 and Chrome at same time, I can't agree with this statement.
Re:Incomplete List of Mistakes in the Design of CSS by gopowerranger on Monday October 26, 2015 @11:21PM (#10456108)
Are you seriously trying to throw IE6 into this to attempt to prove your point? We aren't talking about antiquated browsers no one should be using today.
Re:Incomplete List of Mistakes in the Design of CSS by Ygg2 on Monday October 26, 2015 @11:31PM (#10456130)
Are you seriously trying to deny IE6 isn't there in the wild? It was a job I had to do. I was paid to do it. It was awful. This happened circa 2013.

For contrast I now support IE8 and IE9. Without jQuery. It's bad. Really, really bad. Like, there isn't indexOf on Array and asking for polyfill is forbidden.

Re:Incomplete List of Mistakes in the Design of CSS by gopowerranger on Monday October 26, 2015 @11:44PM (#10456178)
You're one-off job is nothing to be holding up as an example of current web development. My company has 23 active clients and I can't tell you the last time, many years ago, we saw IE8 in the visitors logs much less anything less than that.
Re:Incomplete List of Mistakes in the Design of CSS by spion on Tuesday October 27, 2015 @02:06AM (#10456540)
You should not be so quick to dismiss other people's experience. You should also not assume that your experience is the world norm.

Us programmers often get this wrong.

Re:Incomplete List of Mistakes in the Design of CSS by ascagnel_ on Tuesday October 27, 2015 @08:56AM (#10457653)
Much of the government and enterprise sectors don't want to upgrade their browsers. They put a lot of money into their crappy intranet apps around 2000, and don't want to pay to have them rebuilt; since those require the old browsers to stick around, the new apps will still have to run on the old browsers.
Re:Incomplete List of Mistakes in the Design of CSS by A_COMPUTER on Tuesday October 27, 2015 @02:49AM (#10456647)
I only was able to stop supporting IE7 this year :-P The only thing that has forced some of our customers to upgrade has been a year of successive SSL exploits that have rendered old browsers/OS insecure.
Re:Incomplete List of Mistakes in the Design of CSS by Ygg2 on Tuesday October 27, 2015 @12:26AM (#10456314)
I wasn't holding it as example of current web development. I was holding it as a sample of web development that happened semi recently. It is also why web dev can be a nightmare - Legacy systems and browser incompatibility.

It's great if you never had to deal with them, but that doesn't mean it won't happen.

Note: It wasn't a one-off job either. There were multiple jobs, government sector.

Re:Incomplete List of Mistakes in the Design of CSS by gopowerranger on Tuesday October 27, 2015 @09:05AM (#10457697)
I never said it didn't happen, I dealt with IE4 and Netscape (briefly), and that you mention "government center" is exactly the area I knew you were talking about.
Re:Incomplete List of Mistakes in the Design of CSS by justsayinghi on Monday October 26, 2015 @11:35PM (#10456144)
As of today, you are right. However, we should be aiming towards a future where amateurs don't have to worry about browser incompatibilities. Coding time to be focused on building the product and its features, not juggling css rules to make it look the same across browsers.
Re:Incomplete List of Mistakes in the Design of CSS by pjmlp on Tuesday October 27, 2015 @04:14AM (#10456801)
> And any web site that doesn't work cross browser is by amateurs at best.

Good luck arguing with customers that will only pay when you achieve pixel perfect layouts across all browsers.

Or are able to replicate certain UI behaviors from native platforms.

Doing native stuff again, and I don't miss this type of arguments.

Re:Incomplete List of Mistakes in the Design of CSS by h1762581 on Tuesday October 27, 2015 @06:15AM (#10457128)
>that data goes into the html It's more like static content goes into the html, dynamic content goes into JSON.
Re:Incomplete List of Mistakes in the Design of CSS by Turing_Machine on Monday October 26, 2015 @10:16PM (#10455844)
Hmm... I don't see any conceptual reason why separating those things should require completely different languages, though.
Re:Incomplete List of Mistakes in the Design of CSS by wodenokoto on Monday October 26, 2015 @11:51PM (#10456208)
Nobody bats an eye when you use Python for logic, sql for querying your database and regex for searching text. Unlike the front end, there are ample opportunities for "uniting" the backend in one language, yet nobody really seems to bother.

I speculate that it's because these languages are better at certain things, just like having a non-executable language for data, helps keep the data, data only (cue angry lispers), and facilitates easier writing of prose in a mark-up language than a real programming language could facilitate. Just look at markdown.

More over, we invented JSON, rather than just sending JS files between browser and server.

Re:Incomplete List of Mistakes in the Design of CSS by afarrell on Tuesday October 27, 2015 @04:31AM (#10456844)
> Nobody really seems to bother

I prefer writing queries using Django's ORM even though it is underpowered.

Re:Incomplete List of Mistakes in the Design of CSS by wodenokoto on Tuesday October 27, 2015 @04:39AM (#10456861)
Yeah, I guess I as a little hyperbolic :)
Re:Incomplete List of Mistakes in the Design of CSS by stream_fusion on Monday October 26, 2015 @05:57PM (#10454779)
React and jsx constructed dom using inline-styles brings the disparate technologies together in a composable way.
Re:Incomplete List of Mistakes in the Design of CSS by Touche on Monday October 26, 2015 @11:35PM (#10456145)
But without cascading, the whole point of css.
Re:Incomplete List of Mistakes in the Design of CSS by afarrell on Monday October 26, 2015 @07:36PM (#10455249)
Although LaTeX needs much better error messages.
Re:Incomplete List of Mistakes in the Design of CSS by TabAtkins on Sunday November 01, 2015 @03:08PM (#10487966)
As a very busy CSSWG member... I agree. There are a number of benefits to the current structure, but I highly suspect that if the web were invented today, styling would a JS-mediated aspect of the DOM, not something fully separate like it is today.