Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / September 2003



Tip: Looking for answers? Try searching our database.

the complete stylesheet(s)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ian Fitchet - 29 Sep 2003 17:48 GMT
Hi,

You'll excuse me if this has been answered before but I must have
missed it on my travels:

Is there a definitive style sheet with includes a definition for
everything that a particular browser sets to not-null/zero/inherit?

Given all the usual pixel adjustments here, browser specific bug
fixes there and that, by definition, all browsers set some defaults
is there not any mileage in having a complete stylesheet defining all
the settings from which you can work without tripping over an obscure
:first-child padding when you least expect it?

Feel free to say I'm asking a dumb question, but do at least say why
:-)

Cheers,

       Ian
Nikolaos Giannopoulos - 29 Sep 2003 19:18 GMT
>  Is there a definitive style sheet with includes a definition for
>  everything that a particular browser sets to not-null/zero/inherit?

Uh... no.  I'm not sure why you would expect this to be the case.  Do
you think that:

(a) every browser is equipped with the same CSS rendering engine (if all
browsers came from one company I imagine this "could" be a possibility)

OR

(b) that the CSS specs are so crystal clear and that CSS is so simple
that every browser is surely to get it right (and that every time a
browser vendor finds - better yet is informed of - a CSS bug that they
will care to fix it)

>  Given all the usual pixel adjustments here, browser specific bug
>  fixes there and that, by definition, all browsers set some defaults
>  is there not any mileage in having a complete stylesheet defining all
>  the settings from which you can work without tripping over an obscure
>  :first-child padding when you least expect it?

In a word - NO.

>  Feel free to say I'm asking a dumb question, but do at least say why
>  :-)

I don't think any question is dumb ;-)

What you need to understand is that CSS spec interpretation coupled with
multiple browser vendors (doing the interpretation) doesn't boil down to
a simple 2 + 2 = 4 math problem (and that's assuming we don't even start
to consider bugs or other factors).

--Nikolaos
Ian Fitchet - 29 Sep 2003 22:01 GMT
>>  Is there a definitive style sheet with includes a definition for
>>  everything that a particular browser sets to not-null/zero/inherit?
[quoted text clipped - 12 lines]
> browser vendor finds - better yet is informed of - a CSS bug that they
> will care to fix it)

I don't think either and I didn't mean to suggest either.

Another way: given browser X, version Y is there a stylesheet Z which
if applied replicates the default style settings?

As there is a drive towards CSS conformant browsers in my naivety I
would have thought we could entertain the possibility.  Thereafter,
with the set of Z, developers could see which, if any, settings are
likely to cause them problems and better be able to see how and why
certain presentation is effected.

Cheers,

       Ian
Johannes Koch - 30 Sep 2003 09:16 GMT
>  Another way: given browser X, version Y is there a stylesheet Z which
>  if applied replicates the default style settings?

There are CSS files in Mozilla installations containing style
declarations for many elements.
Signature

Johannes Koch
In te domine speravi; non confundar in aeternum.
                            (Te Deum, 4th cent.)

Ian Fitchet - 30 Sep 2003 16:50 GMT
> There are CSS files in Mozilla installations containing style
> declarations for many elements.

ccjpb@shark.cse.bris.ac.uk (JP. Baker) writes:

> http://www.w3.org/TR/2003/WD-CSS21-20030915/sample.html

Thank you, the two "John"s for providing examples.  I accept that no
UA may actually follow these but they give a good starter for ten for
anyone wanting to understand a core stylesheet.

For example, you might note that for many things margin is defined in
terms of ems (1.17em, 0.83em etc.) except that some things define
margin in px (eg. blockquote 40px).

The reason for my question is that you can obviously extend such
simple introspection to work out why, as I have found, that some but
not all <input> within a <form> have a different background colour in
IE6 build XYZ to the one I choose.  I might also have trivially seen
that <input> in IE6 ignores whatever parent font-size I have set and
I have to set one for it explicitly.

I don't want to have all browsers look the same (sorry, Peter!) but
I'd like to know what funny defaults I'm up against across my
favourite browser set.  I don't think that's an unreasonable question
to ask (and orthogonal to the question many people seem to think I've
asked) and I'm surprised that so many eminent authors in the land of
CSS haven't addressed it explicitly rather than maintain browser
specific fixes which attempt to answer the same question but from the
other end erring on the side of incompleteness.

Cheers,

       Ian
Peter Foti - 30 Sep 2003 15:10 GMT
> >>  Is there a definitive style sheet with includes a definition for
> >>  everything that a particular browser sets to not-null/zero/inherit?
[quoted text clipped - 17 lines]
>  Another way: given browser X, version Y is there a stylesheet Z which
>  if applied replicates the default style settings?

I think this is a great question.  However, as I just recently learned in
the "Font sizes - Best practice... px vs. em" thread, you probably can't do
this without losing some accessibility.  That is, browser X might use a
different font size than browser Y, and the end user's settings are
dependent upon that.

But I still think it's a valid question.  I don't think there currently
exists a stylesheet that forces browsers to act the same (at least I haven't
seen one).  If you were going to write one, though, the best approach would
probably be to write it for an XML document (giving your XML elements the
same names as HTML elements).  That way you are not using any of the
built-in styles of HTML.  This of course forces you to specify EVERY detail
(like display:block).  The stylesheet would be pretty huge I would imagine.

Regards,
Peter

>  As there is a drive towards CSS conformant browsers in my naivety I
>  would have thought we could entertain the possibility.  Thereafter,
[quoted text clipped - 5 lines]
>
>         Ian
Nikolaos Giannopoulos - 30 Sep 2003 16:03 GMT
>> I don't think either and I didn't mean to suggest either.
>>
>> Another way: given browser X, version Y is there a stylesheet Z which
>> if applied replicates the default style settings?

<snip>

> But I still think it's a valid question.  I don't think there currently
> exists a stylesheet that forces browsers to act the same (at least I haven't
> seen one).  If you were going to write one, though, the best approach would
> probably be to write it for an XML document (giving your XML elements the
> same names as HTML elements).

Do you really believe what you are suggesting or are you just making
this up because honestly I have to wonder.

Do you honestly believe that you can make *all* browsers behave the same
way for *all* CSS rules by simply creating some unified style sheet.

You'll will discover - as I imagine you haven't yet - that this is an
impossibility and I could give you numerous cases wherein this is flat
out impossible and you simply have to live with the nuances or change
your design accordingly (if you can that is).

BTW what does XML have to do with solving this problem?  Is that the
unifying part - the magic ingredient that solves the problem?

> That way you are not using any of the
> built-in styles of HTML.  This of course forces you to specify EVERY detail
> (like display:block).  The stylesheet would be pretty huge I would imagine.

Even if you could specify every detail what makes you believe this is
even possible.  I'll argue that no matter how large your style sheet
that this is not going to work and you would probably be surprised that
it would break down a lot sooner than you think i.e. I don't think you
would get very far with this without realizing it is fruitless.

If you don't believe me then what can I say - give it a try ;-)

--Nikolaos
Peter Foti - 30 Sep 2003 16:34 GMT
> >> I don't think either and I didn't mean to suggest either.
> >>
[quoted text clipped - 11 lines]
> Do you really believe what you are suggesting or are you just making
> this up because honestly I have to wonder.

Please note that I said "the best approach".  I never said it was a definate
solution.

> Do you honestly believe that you can make *all* browsers behave the same
> way for *all* CSS rules by simply creating some unified style sheet.

While it would be nice, I suspect that browser bugs would make this
impossible.

> You'll will discover - as I imagine you haven't yet - that this is an
> impossibility and I could give you numerous cases wherein this is flat
[quoted text clipped - 3 lines]
> BTW what does XML have to do with solving this problem?  Is that the
> unifying part - the magic ingredient that solves the problem?

Because UAs have default ways to render HTML elements (H1 is large and bold
for example), the only way to start from scratch is to use XML, where there
is no such default rendering for these elements.

> > That way you are not using any of the
> > built-in styles of HTML.  This of course forces you to specify EVERY detail
[quoted text clipped - 5 lines]
> it would break down a lot sooner than you think i.e. I don't think you
> would get very far with this without realizing it is fruitless.

Perhaps.

> If you don't believe me then what can I say - give it a try ;-)

You first. :)

-Pete

> --Nikolaos
JP. Baker - 30 Sep 2003 15:51 GMT
> You'll excuse me if this has been answered before but I must have
> missed it on my travels:
>
> Is there a definitive style sheet with includes a definition for
> everything that a particular browser sets to not-null/zero/inherit?

Not quite what you asked. But do you mean something like:

http://www.w3.org/TR/2003/WD-CSS21-20030915/sample.html

    nhoJ
Signature

John P Baker

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.