[Javascript] Re: Standards

David Lovering dlovering at gazos.com
Fri Apr 11 17:01:58 CDT 2003


Sigh.  Oh well, there's nothing for it but to dive in and swim with the
alligators.

(1)     font-sizing includes both relative and absolute sizes in canonical
format:
        <font face='arial' size='+1' color='red' ...> stuff </font>
        <font family='helvetica,sans-serif' size='10px' color='black' ...

      and so forth.  Relative sizing didn't work on the cases I tried in
NS7, and pt only worked down to
      10 pt.  Some of this may be attributable to preferences, but my NS7 is
"straight out of the box" and hasn't been
      customized.

(2)    "Shows differently" isn't good enough.  When I say 0 margin, I MEAN 0
margin.  When I say 5px, I want 5px, based upon accessible screen geometry
parameters.  Netscape apparently chooses certain thresholds for sizing, and
if the object is bigger or smaller then that it does some kind of funky
scaling.  In particular, I noticed that it didn't respect the margins around
an included image with respect to some text in paragraph format that was
intended to flow around it.  The example I used was straight out of the HTML
4.0 Sourcebook, and it worked on most of the Mozilla and IE platforms I
tried.  Those that didn't render EXACTLY as I specified came pretty close,
and only rounded up by a point size.  Netscape 7.0 overwrote the boundaries
of the illustration by almost 1/2 inch.  Unacceptable, particularly for
vanilla HTML4.0.

(3)    On button labels I refer both to the 'value' variety and to the
embedded legend variety.  Also, the use of the newer <BUTTON> construct
doesn't seem to be respected, and only <INPUT TYPE="BUTTON"> works even
vaguely like it should.  ANYTHING (button, image, whatever) that has
provisions for labelling should be able to accommodate a <legend> directive,
and Netscape doesn't cut it.  If you wish I can send you a number of
examples, but since all of the ones I tried crapped out, I don't think it
will be too hard to devise some of your own.  Admittedly, if you use the
value='blah' method of labelling a standard <INPUT TYPE='BUTTON'> thingy,
the text does appear -- but it doesn't reliably accept the style parameters
which customize the appearance, size, and inset associated with the label.
Just getting a colored but empty box on the screen (with incorrect borders,
I might add) doesn't cut it.

(4)    For those who are anal-retentive about labelling REAL button widgets
(as opposed to INPUT TYPE=BUTTON widgets), try the following example:

        <button name='myButton' type='image' src='blank.gif'
                    style='background-color: #cccccc; border-style: ridge;
border: 1pt ridge; height: 18px; width: 60px'
                    onClick='alert("bite me!")'>
            <legend align='center' style='text-align: center'>
                <font face='arial' color='black' style='font-weight: bold;
font-size: 7pt'>Bite Me!</font>
            </legend>
        </button>

        On Netscape (name your flavor) I guarantee you won't like what you
get.  Obviously, the indents go away in a packed code module, and are
provided here only for clarity.

(5)    For all those who simply want to make something "disappear", simply
tweaking the .style.visibility CSS parameter is good enough.  For those who
want to do real layering (say, with 4 or five layers, and varying
transparency), Netscape isn't even in the ballpark.  It's a shame, because
for years I defended Netscape as being a more solid platform than the early
IE.

(6)    The HTML standards document says that the standard border color is
black, although I can live with neutral grey, puce, mauve, chartreuse, or
whatever.  What I can't live with is when I define the border-color, and
Netscape swaps it out for #cccccc, or worse yet, 'grey' (which doesn't match
'#cccccc' and varies depending on your screen palette).  When I say I want
my borders to be black explicitly, I damn well mean I WANT IT THAT WAY!

(7)    You're right -- NN does have more control over its select objects
than does IE.  The problem is that not all of the controls conform to the
standards already defined for those particular features.  Again, this is a
sin that any number can play at -- IE has some proprietary features of
SELECT which aren't canonical either.  However, they make up for it by
supporting the core standard elements, while NN doesn't.  Again, I'm
gullible -- when the HTML4.0 Sourcebook says something should work, I
believe it right up to the point where the dillusionment sets in.

(8)    About key events -- much improvement has been made in Netscape
(unlike much of the previous 4 years), but I still would like to see
absolutely standard events supported BEFORE the funky-ass proprietary
gee-whiz ones.  We discussed keyDown versus keyPress.  Yes, Netscape has had
keyDown since the dinosaurs hatched, but they never pushed it to the HTML SG
for acceptance.  As an old NIST/NBS code jockey, I'm big on the written
standards, not the defacto ones.  Defacto ones are perfectly good standards,
right up to the point where they aren't anymore -- and then all your code
breaks, all at once.  [And for all you folks that wonder why there is a big
fuss about this -- keyDown doesn't work on keyboards whose ROM programs
force automatic 50ms debounce to 'zero'.  In my book, if you feel your
finger mashing on the key, the key is DOWN, and the keyDown event (or if you
prefer using the handler designation, onKeyDown) should be active.  In the
special case described above, it isn't after the first 50 ms.  However, the
onKeyPress event turns off debouncing (I could elaborate on the assembly
language it takes to do this, but I won't), and so gives a truer picture of
when your greasy thumb is clamped on to some key or another.  That's merely
one example -- the keyCode definitions are also non-standard.  That's no
fault of NN, but I wish everyone could agree on this and go home.

Enough ranting.  Back in the days when there was one 'Netscape' standard,
and one 'Internet Explorer' standard, these issues were no biggy -- one
conditional test at the start, and some handy-dandy macros, and hey-presto!
Everything was cool.  However, when ALL the browsers show HUGE differences
between consecutive versions (and even between consecute revs!),  and all of
them are different with respect to one another, writing code for them is
getting very ugly.  Most of the folks I know who do production coding write
a JavaScript front-end that tests for the existence of their preferred
platform, and if it is not being used at the client-side, they print a
nastygram and die.  Very unprofessional, but also very understandable.

-- Dave Lovering




----- Original Message -----
From: "Chris Tifer" <christ at saeweb.com>
To: "[JavaScript List]" <javascript at LaTech.edu>
Sent: Friday, April 11, 2003 2:01 PM
Subject: Re: [Javascript] Re: Standards


> I'd like to see how you do your styles. My comments are inline:
>
>
> > Well, I won't provide an exhaustive list, but just in several minutes of
> > testing I found the following:
> >
> >     (1)    font-sizing directives don't work one-to-one and onto
>
> Not quite sure what "one-to-one and onto" mean, but using something like:
> font: 12px arial; works just fine.
>
> >     (2)    Image boundary zones aren't respected (margin-top,
> margin-right,
> > etc.)
>
> <img src="http://www.emailajoke.com/images/ver4/common/topLogo.gif"
> border="1" style="margin-top: 10px; margin-right: 0px;">
>
> Test
>
> Shows differently than:
>
> <img src="http://www.emailajoke.com/images/ver4/common/topLogo.gif"
> border="1" style="margin-top: 10px; margin-right: 20px;">
>
> Test
>
>
> >     (3)    button labels don't appear
>
> What type of labels are you talking about here? I don't know of any
> possible label declarations available through CSS
>
>
> >     (4)    layers -- still use Netscape proprietary methods for hiding
> > (visibility doesn't render the same way)
>
> Adding visibility: hidden; to the above image will make it disappear.
> WithOUT being in a layer or anything like that.
>
>
> >     (5)    borders all default to standard grey, and relief declarations
> > don't work properly
>
> Is there a standard default border color out there that's been defined and
> accepted by browser makers?
>
> >     (6)    cellspacing declarations are ignored, or altered
substantially
>
> I couldn't get a cellspacing property to work in either browser. How
> do you accomplish this?
>
> >     (7)    CSS definitions pertaining to the internals of text fields,
> > pull-downs, etc. either don't work at all or are
> >             substantially modified from their declared values
>
>
> If I recall correctly, I thought I had found that with SELECT lists,
> NN had MORE control than IE, but I don't have any code handy.
>
> Also, something like this:
>
> <form>
>  <input type="text" name="test" size="20" value="test" style="padding:
15px;
> color: #FF0000; background: #000000;">
> </form>
>
> Actually works more to how I would imagine it should in NN than
> in IE. It adds the padding to the text. In IE, it's still there, but the
> textbox didn't get any larget so you can't tell...
>
>
> >     (8)    Key events are still flaky, and the masks don't conform to
> > HTML4.0 spec.  Don't worry, IE doesn't make the
> >             grade on this one either.
> >
>
>
> I'm sure the masks aren't that good, but key events are stable, as
> we went over just yesterday or two days ago. They've even been
> working since NN4. How you handle them is different, but in the
> end, that's not a CSS issue, but a scripting issue.
>
> Chris Tifer
>
> P.S. Keep in mind that I used to bash NN constantly. It's just
> obvious to me that they're FINALLY trying to do something about
> the bad reputation they were earning.
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>




More information about the Javascript mailing list