469,303 Members | 2,066 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,303 developers. It's quick & easy.

the complete stylesheet(s)

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

Jul 20 '05 #1
8 1917
Ian Fitchet wrote:

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

Jul 20 '05 #2
Nikolaos Giannopoulos <ni******@solmar.ca> writes:
Ian Fitchet wrote:
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)


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
Jul 20 '05 #3
Ian Fitchet wrote:
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.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)

Jul 20 '05 #4
"Ian Fitchet" <id*@lunanbay.LESS-SPAM.com> wrote in message
news:x7************@s59br.home.lunanbay.com...
Nikolaos Giannopoulos <ni******@solmar.ca> writes:
Ian Fitchet wrote:
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)


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?

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,
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

Jul 20 '05 #5
Peter Foti wrote:
"Ian Fitchet" <id*@lunanbay.LESS-SPAM.com> wrote in message
news:x7************@s59br.home.lunanbay.com...
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

Jul 20 '05 #6
In article <x7************@s59br.home.lunanbay.com>,
Ian Fitchet <id*@lunanbay.LESS-SPAM.com> wrote:

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
--
John P Baker
Jul 20 '05 #7
"Nikolaos Giannopoulos" <ni******@solmar.ca> wrote in message
news:CM********************@magma.ca...
Peter Foti wrote:
"Ian Fitchet" <id*@lunanbay.LESS-SPAM.com> wrote in message
news:x7************@s59br.home.lunanbay.com...
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.

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
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?

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 (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.

Perhaps.

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

-Pete


--Nikolaos

Jul 20 '05 #8
Johannes Koch <ko**@w3development.de> writes:
There are CSS files in Mozilla installations containing style
declarations for many elements.
cc***@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
Jul 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Raphael Goubet | last post: by
3 posts views Thread by Sarah Haskins | last post: by
4 posts views Thread by Jens Riedel | last post: by
4 posts views Thread by Wim Roffal | last post: by
reply views Thread by Jan Roland Eriksson | last post: by
7 posts views Thread by pintihar | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.