October 06, 2010
On 04/10/2010 19:42, Walter Bright wrote:
> Stewart Gordon wrote:
>> The layout breaks in anything but the default text zoom.
>
> The annoying thing about this is everyone says "don't use tables for
> layout, use CSS." Except that using CSS for layout DOESN'T WORK
> RELIABLY. With tables, I can get 3 columns that are actually 3 columns,
> not 3 columns that are a side effect of bugs in CSS.

Indeed, here are just a few things I hate to bits about CSS:

- no overflow: grow
- overflow: grow isn't the default
- width and height mean the width and height excluding the padding

http://goingspare.wordpress.com/2007/04/06/css-padding-and-width/

Stewart.
October 06, 2010
Stewart Gordon wrote:
> Indeed, here are just a few things I hate to bits about CSS:

Sure, but we're kind of stuck with it. While we can invent a new programming language, I don't think that inventing a new browser markup language is going to get any traction without convincing Microsoft, Google, and Apple to all get on board.
October 06, 2010
"Arlo White" <awhite@calpoly.edu> wrote in message news:i8gem3$20al$1@digitalmars.com...
> That's because HTML/CSS is a pretty terrible language for anything beyond simple layouts. It shares more with Word/PDF/PostScript in terms of its purpose and history than it does with real gui layout engines (GTK, QT, etc).
>
> Hardcore HTML/CSS people tout the virtues of separating the content from the presentation. The problem is that HTML has implicit presentation that you often can't override with CSS. There are limits to what you can do with positioning. If I want to rearrange elements in my page I have to change the HTML, I can't do it all on the CSS side. That's not separation of content from presentation!
>
> Real separation of the presentation has to happen right at the data layer. But that's server side in most applications. So you run your data through one view abstraction (template language such as Freemarker, PHP, JSP etc), then to HTML, and then polish it with CSS. Oh, and that application runs on an app server that runs in a Java virtual machine that runs in an VMware OS that runs on a real OS that actually accesses real hardware. That's an absurd number of layers...
>
> Anyway, to get back to HTML. They'll say use divs not tables because a table represents a distinct concept not a layout element and it has accessibility implications. And yet I you can't layout things with divs in the same way that I can with a table. And even if there are obscure CSS properties that let me, half the user's browsers don't support them.
>
> Sometimes I feel like I'm the only one that sees the naked Emperor. People are so excited about the Internet but they don't realize that browsers are just implementing one view language that's 15 years old and really isn't all that great. The beauty of the Internet is the emergent properties that arose from the concept of linking sites. But that's not something that has to be unique to the HTML language itself.
>
> And sure there's some cool stuff in HTML5 but a pig's still a pig even when you velcro a TV to its head and a database on its back.
>

I seem to have met my doppleganger ;) Seriously, if I didn't know better I'd have to check the "From" line to know I hadn't written that myself.

Welcome to the Amish-of-programming club. We're small, but growing ;)


October 06, 2010
"Stewart Gordon" <smjg_1998@yahoo.com> wrote in message news:i8gfqi$22lj$1@digitalmars.com...
> On 04/10/2010 19:42, Walter Bright wrote:
>> Stewart Gordon wrote:
>>> The layout breaks in anything but the default text zoom.
>>
>> The annoying thing about this is everyone says "don't use tables for layout, use CSS." Except that using CSS for layout DOESN'T WORK RELIABLY. With tables, I can get 3 columns that are actually 3 columns, not 3 columns that are a side effect of bugs in CSS.
>
> Indeed, here are just a few things I hate to bits about CSS:
>
> - no overflow: grow
> - overflow: grow isn't the default
> - width and height mean the width and height excluding the padding
>
> http://goingspare.wordpress.com/2007/04/06/css-padding-and-width/
>

Yea. The thing about width/height reminds me too, as much as IE gets chastized for not following spec, there's a lot of times their approach is just plain *better* than the hairbrained W3C spec. IE used to include border as part of the width. That made a lot more sense. And then there's the W3C's completely idiotic handling of JS mouse events. It's downright retarded. IE's approach, while different, was at least *good*. You could actually tell the mouse buttons apart! Gee, imagine that! But now they're forced into compliace with the *worse* alternatives, and all the others who are doing it flat-out wrong get to sit around and have their dumbass way. Not that MS always makes better designs, but the web-dev community's IE bashing just gets absurd sometimes. And FWIW, as a web dev, I've had just as much rendering problems with FF as with IE. Heck, I've even had FF (both 2 and 3) completely *lose* an entire flash applet just because of an obscure oddity in it's CSS width/height handling - but IE and Iron handled it perfectly fine.

Heck, even the trivial stuff is screwy in CSS: For everything that affects letters and words, is there any *real* logic to what's "font-", what's "text-" and what's neither? Trivial example, but just illustrates why the web gets me so pissed: everything from bottom to top is just garbage and no one seems to notice or care. And the few that do notice and care just throw their hands up and say "Well, it won't catch on, so why bother?" I'm damn glad Walter never decided "There's no way I can compete with MS's .NET or Sun's Java, or the astronomical userbase of C/C++, so why bother to try?"


October 06, 2010
"Walter Bright" <newshound2@digitalmars.com> wrote in message news:i8gj1i$28h4$1@digitalmars.com...
> Stewart Gordon wrote:
>> Indeed, here are just a few things I hate to bits about CSS:
>
> Sure, but we're kind of stuck with it. While we can invent a new programming language, I don't think that inventing a new browser markup language is going to get any traction without convincing Microsoft, Google, and Apple to all get on board.

Microsoft would never know it existed.

Goggle would steal it and re-invent a crappy version of it.

Apple would put a note in their developer-license-agreement prohibiting it.

Sun would release a whitepaper that attempted to explain why it wasn't needed, but in their attempt they would accidentally make it clear it was a good idea after all.

Oracle would create a not-terrible-but-not-great version of it and have their salesmen spend a couple million each convincing middle and upper managers to pay twenty million for it each. Most of them would fall for it.

Sony would form a committee to investigate the feasibility of introducing DRM capabilities into it.

No one would ever notice if IBM did or didn't do anything with it.

Hobbyist developers would flock towards a newly-created alternate version that seemed simpler at first glance, but was much slower and really just made it easier to introduce subtle bugs.

W3C would form a committee to standardize it. Their early recommendations would combine the worst aspects of all the various versions. The final draft would be nearly identical to the early drafts, but wouldn't be finalized until the original committee's grandchildren were in retirement facilities.

Adobe would create a mediocre, bloated, yet passable child-window-fiesta-of-an-app to deal with it and charge hundreds for it. It would be enormously popular.

The people formerly from JASC would create a great alternative to Adobe's offering at a reasonable price, and after no one bought it they would kill it off by selling the rights to the dying carcass of some formerly-relevant corporation.

Corel...ah ha ha ha ha! Corel...That's a joke that doesn't need a punchline.

Hasbro Interactive would buy the rights to one of the older versions, and sue any individuals and small businesses that had anything similar. Then they would sell the rights.

Steve Yegge will have something to say about it, but no one will know or care what it is because by the time they finish reading his post the universe will have ended. But he'll still maintain that his long-winded approach was "good marketing".



October 06, 2010
On Wed, 06 Oct 2010 01:36:24 -0400, Nick Sabalausky wrote:

> "Walter Bright" <newshound2@digitalmars.com> wrote in message news:i8gj1i$28h4$1@digitalmars.com...
>> Stewart Gordon wrote:
>>> Indeed, here are just a few things I hate to bits about CSS:
>>
>> Sure, but we're kind of stuck with it. While we can invent a new programming language, I don't think that inventing a new browser markup language is going to get any traction without convincing Microsoft, Google, and Apple to all get on board.
> 
> Microsoft would never know it existed.
> 
> Goggle would steal it and re-invent a crappy version of it.
> 
> Apple would put a note in their developer-license-agreement prohibiting it.
> 
> Sun would release a whitepaper that attempted to explain why it wasn't needed, but in their attempt they would accidentally make it clear it was a good idea after all.
> 
> Oracle would create a not-terrible-but-not-great version of it and have their salesmen spend a couple million each convincing middle and upper managers to pay twenty million for it each. Most of them would fall for it.
> 
> Sony would form a committee to investigate the feasibility of introducing DRM capabilities into it.
> 
> No one would ever notice if IBM did or didn't do anything with it.
> 
> Hobbyist developers would flock towards a newly-created alternate version that seemed simpler at first glance, but was much slower and really just made it easier to introduce subtle bugs.
> 
> W3C would form a committee to standardize it. Their early recommendations would combine the worst aspects of all the various versions. The final draft would be nearly identical to the early drafts, but wouldn't be finalized until the original committee's grandchildren were in retirement facilities.
> 
> Adobe would create a mediocre, bloated, yet passable child-window-fiesta-of-an-app to deal with it and charge hundreds for it. It would be enormously popular.
> 
> The people formerly from JASC would create a great alternative to Adobe's offering at a reasonable price, and after no one bought it they would kill it off by selling the rights to the dying carcass of some formerly-relevant corporation.
> 
> Corel...ah ha ha ha ha! Corel...That's a joke that doesn't need a punchline.
> 
> Hasbro Interactive would buy the rights to one of the older versions, and sue any individuals and small businesses that had anything similar. Then they would sell the rights.
> 
> Steve Yegge will have something to say about it, but no one will know or care what it is because by the time they finish reading his post the universe will have ended. But he'll still maintain that his long-winded approach was "good marketing".

:D
October 06, 2010
On 06.10.2010 06:49, Nick Sabalausky wrote:
> "Stewart Gordon"<smjg_1998@yahoo.com>  wrote in message
> news:i8gfqi$22lj$1@digitalmars.com...
>> On 04/10/2010 19:42, Walter Bright wrote:
>>> Stewart Gordon wrote:
>>>> The layout breaks in anything but the default text zoom.
>>>
>>> The annoying thing about this is everyone says "don't use tables for
>>> layout, use CSS." Except that using CSS for layout DOESN'T WORK
>>> RELIABLY. With tables, I can get 3 columns that are actually 3 columns,
>>> not 3 columns that are a side effect of bugs in CSS.
>>
>> Indeed, here are just a few things I hate to bits about CSS:
>>
>> - no overflow: grow
>> - overflow: grow isn't the default
>> - width and height mean the width and height excluding the padding
>>
>> http://goingspare.wordpress.com/2007/04/06/css-padding-and-width/
>>
>
> Yea. The thing about width/height reminds me too, as much as IE gets
> chastized for not following spec, there's a lot of times their approach is
> just plain *better* than the hairbrained W3C spec. IE used to include border
> as part of the width. That made a lot more sense. And then there's the W3C's
> completely idiotic handling of JS mouse events. It's downright retarded.
> IE's approach, while different, was at least *good*. You could actually tell
> the mouse buttons apart! Gee, imagine that! But now they're forced into
> compliace with the *worse* alternatives, and all the others who are doing it
> flat-out wrong get to sit around and have their dumbass way. Not that MS
> always makes better designs, but the web-dev community's IE bashing just
> gets absurd sometimes. And FWIW, as a web dev, I've had just as much
> rendering problems with FF as with IE. Heck, I've even had FF (both 2 and 3)
> completely *lose* an entire flash applet just because of an obscure oddity
> in it's CSS width/height handling - but IE and Iron handled it perfectly
> fine.
>
> Heck, even the trivial stuff is screwy in CSS: For everything that affects
> letters and words, is there any *real* logic to what's "font-", what's
> "text-" and what's neither? Trivial example, but just illustrates why the
> web gets me so pissed: everything from bottom to top is just garbage and no
> one seems to notice or care. And the few that do notice and care just throw
> their hands up and say "Well, it won't catch on, so why bother?" I'm damn
> glad Walter never decided "There's no way I can compete with MS's .NET or
> Sun's Java, or the astronomical userbase of C/C++, so why bother to try?"
>
>

I have a totally different experience with all that. Back in the IE 6 days it took me about 2 days to build a standard cooperate website for a small business that worked perfectly in standard conforming browsers (FF 1, 2, Opera, ...). It then usually took about a week (!) to get it work in IE 6. The time needed to "IEify" a design and layout went down with time as I learned every bug of IE by hard (oh the beloved Peek-a-boo bug) but it still was a major pain in the ass, really. Every professional web developer had to know quite a lot about the IE 6 renderer just to get some basic stuff right (e.g. the hasLayout mechanism). Whenever I encountered a bug in other browsers (happened some times in FF 1 and 2) it was gone in one of the next few releases. IE 6 however had no progress for years and that was the reason many web developers literally hated IE 6. :)

Microsoft had some good ideas before they ditched the entire IE team. Including the padding and border into the width and height of an element sure is handy. But actually I'm more concerned with a consistent behavior than with a perfect one. As long as all browsers do the proper box model I'm more than willing to calculate a bit. I had to do quite some stuff that worked on IE 5 too (IE 5.0, 5.01 and 5.5, all had their own little quirks) and the most annoying thing was to calculate the dimensions for every element including the padding and border. Don't ever ask a web developer about IE after such a project, it's like jumping into a basin full of piranhas.

With modern browsers you can switch the box model using the "box-sizing" property for every element. So you can use width and hight that includes padding and the border. I used it recently and it works quite well.

> Heck, even the trivial stuff is screwy in CSS: For everything that affects
> letters and words, is there any *real* logic to what's "font-", what's
> "text-" and what's neither?

It's a bit confusing at first but as soon as you know a bit more about how fonts are structured and build it makes perfect sense. ;)

The big difference between web development and "traditional" programming is that web development actually is a combination of many different technologies. It's not just one environment and mental pattern to catch it all but a combination of distinct technologies with distinct mental patterns each one well suited for its purpose (HTTP, HTML, CSS, JavaScript). Thats maybe the biggest problem for people that don't use this stuff all the time. Depending on what you're doing you have to totally switch your way of thinking.

However there are people that know this stuff as well as Walter knows compilers and in my opinion they did a great job designing these technologies. They perfectly complement each other and that's a great achievement. They are not perfect but there is constant progress and thats important (just as with D).

Happy programming
Stephan
October 06, 2010
On 06/10/2010 01:27, Stewart Gordon wrote:
> On 04/10/2010 19:42, Walter Bright wrote:
>> Stewart Gordon wrote:
>>> The layout breaks in anything but the default text zoom.
>>
>> The annoying thing about this is everyone says "don't use tables for
>> layout, use CSS." Except that using CSS for layout DOESN'T WORK
>> RELIABLY. With tables, I can get 3 columns that are actually 3 columns,
>> not 3 columns that are a side effect of bugs in CSS.
>
> Indeed, here are just a few things I hate to bits about CSS:
>
> - no overflow: grow
> - overflow: grow isn't the default
> - width and height mean the width and height excluding the padding
>
> http://goingspare.wordpress.com/2007/04/06/css-padding-and-width/
>
> Stewart.

I had about 3 jousts with CSS and HTML layout stuff, quite some years ago (around 3-5 years). CSS is great for setting up the style of the page (as in colors, fonts, font properties, etc.)...  but for layout, it sucks a lot! It's the C++ of markup languages, if not worse.

My first joust was me trying to alter the template I got for my homepage to use divs/css instead of tables. I tried a few things, but never managed to make it show up the way I wanted in both IE 6 and Firefox. I gave up and left the template with tables, and here the blame was put solely on browsers issues, since it seemed IE 6 was not being standards compliant most of the time. (even with the HTML version set to 4, so that IE would not try compatibility hacks for old HTML versions) . Note that on this first attempt I had only read some simple CSS tutorials, and I had no knowledge of how things should render, only intuition (and the latest Firefox as a sort of reference).

Fast forward 6 months later or something like that. After reading about someone lauding CSS2, I decide to have another go. This time I read a lot about HTML/CSS2, hoping do understand it properly, and to actually be able to figure how the layout should look like (because at the time even Firefox had some prominent layout bugs). It was an utter mess again. Even with a a better understanding of CSS, all the code I tried never worked properly in both browsers. Now for some of that code I knew for sure that the problem was that IE was not being standards compliant, and why (even though in some case its behavior seemed the most logical one).
After much trial-and-error, learning about the quirks of each browser, hair-pulling, I finally managed to get a working layout (with a few minor concessions in the original intended functionality). But here even though there were faults in the browsers, I became of the opinion that that CSS/HTML layout itself was extremely complicated, and was actually more at fault than the browsers issues (hence the comment of "C++ of markup languages").

The confirmation of that came a year later, when again I delved into HTML layout. This time, I wanted to create a HTML page exactly emulating the Europass CV template (which, for those not familiar, is actually fairly more complicated than the typical resume layout, especially to render the separating lines). I found that:
a) I had practically forgotten all the CSS/HTML rules and info that I had "learned" before, because they were so strange, complicated, and *unnatural* that there is now way you remember them unless you work with it on a daily basis.
b) Even though now I only cared about it rendering properly in the latest Firefox (it was mostly for internal use only), and so I had no more browser incompatibilities, I still had lots of trial-and-error and hair pulling. I became completely dissatisfied with HTML/CSS layout... it has definitely gained the "crap" designation from me.

-- 
Bruno Medeiros - Software Engineer
October 06, 2010
"Stephan Soller" <stephan.soller@helionweb.de> wrote in message news:i8hg3n$15qu$1@digitalmars.com...
>
> I have a totally different experience with all that. Back in the IE 6 days
...
> I had to do quite some stuff that worked on IE 5 too (IE 5.0, 5.01 and 5.5, all had their own little quirks)

Well, yea, IE5/6 were pretty bad. I'll grant that ;)


October 06, 2010
On 06.10.2010 02:08, Arlo White wrote:
> That's because HTML/CSS is a pretty terrible language for anything
> beyond simple layouts. It shares more with Word/PDF/PostScript in terms
> of its purpose and history than it does with real gui layout engines
> (GTK, QT, etc).
>

HTML/CSS is primary made for documents not applications. If you want you can simply make every element a block level element and use JavaScript for layout. I don't know GTK and QT in depth but then you should have about the same level of possibilities as with these layout engines. It wouldn't surprise me if GUI frameworks like jQuery UI actually do this.

However the way GUI frameworks approach layout isn't very well suited for documents and therefore I'm very happy that they oriented CSS on documents (there were several early drafts and what we know today was just the draft from Howcome Lie).

> Hardcore HTML/CSS people tout the virtues of separating the content from
> the presentation. The problem is that HTML has implicit presentation
> that you often can't override with CSS. There are limits to what you can
> do with positioning. If I want to rearrange elements in my page I have
> to change the HTML, I can't do it all on the CSS side. That's not
> separation of content from presentation!
>

You can do quite a lot of stuff with the "position" property. As soon as you defined something as "position: absolute" you can move it around as you want. How well that (and other techniques) work depends on your HTML structure. However I have to agree that in most practical cases you have to modify the HTML in any way because the document structure changes.

> Real separation of the presentation has to happen right at the data
> layer. But that's server side in most applications. So you run your data
> through one view abstraction (template language such as Freemarker, PHP,
> JSP etc), then to HTML, and then polish it with CSS. Oh, and that
> application runs on an app server that runs in a Java virtual machine
> that runs in an VMware OS that runs on a real OS that actually accesses
> real hardware. That's an absurd number of layers...
>
> Anyway, to get back to HTML. They'll say use divs not tables because a
> table represents a distinct concept not a layout element and it has
> accessibility implications. And yet I you can't layout things with divs
> in the same way that I can with a table. And even if there are obscure
> CSS properties that let me, half the user's browsers don't support them.
>

Unfortunately this is true (if "half the user's browsers" refers to IE 6 and 7). In other browsers however you can do exactly the same as with tables but with significantly less HTML elements ("display: table" property). Plus the other positioning models allow you to do things that are not possible with HTML. Netscape 4 once supported an "layer" element which could have been used to do stuff like you can do with "position: absolute" but the resulting HTML had nothing to do with "a document" any more.

> Sometimes I feel like I'm the only one that sees the naked Emperor.
> People are so excited about the Internet but they don't realize that
> browsers are just implementing one view language that's 15 years old and
> really isn't all that great. The beauty of the Internet is the emergent
> properties that arose from the concept of linking sites. But that's not
> something that has to be unique to the HTML language itself.
>
> And sure there's some cool stuff in HTML5 but a pig's still a pig even
> when you velcro a TV to its head and a database on its back.
>
>
> -Arlo
>

I have to agree that it's all about linking content that really created the web. It's not unique to HTML (I even saw thinks like that in "The mother of all demos" form Douglas Engelberth, 1968) but more to HTTP. HTML just happened to be wildly used to create documents on the web.

As for HTML5 still being a pig… well I definitely agree at some parts but they already cleaned up a lot. Just because the structure of C once was quite ugly (IMHO) doesn't mean that D is still ugly (since it's based on C). Technologies as well as taste evolve constantly.

>
>
>
> On 10/04/2010 02:23 PM, Walter Bright wrote:
>>
>> That's what bugs me. Something as straightforward as a 3 column layout
>> shouldn't require "tricks" for it. Googling it found 3 pages dedicated
>> to explaining this "trick" (each of them wildly different, of course).
>>
>
>