New home page

Stephan Soller stephan.soller at helionweb.de
Wed Oct 6 02:36:51 PDT 2010


On 06.10.2010 06:49, Nick Sabalausky wrote:
> "Stewart Gordon"<smjg_1998 at yahoo.com>  wrote in message
> news:i8gfqi$22lj$1 at 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


More information about the Digitalmars-d-announce mailing list