473,655 Members | 3,114 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2079
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******@solma r.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.L ESS-SPAM.com> wrote in message
news:x7******** ****@s59br.home .lunanbay.com.. .
Nikolaos Giannopoulos <ni******@solma r.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.L ESS-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.lun anbay.com>,
Ian Fitchet <id*@lunanbay.L ESS-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******@solma r.ca> wrote in message
news:CM******** ************@ma gma.ca...
Peter Foti wrote:
"Ian Fitchet" <id*@lunanbay.L ESS-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**@w3develop ment.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1688
by: Raphael Goubet | last post by:
Hello, Has anyone ever written a complete CSS Stylesheet for the TEILite XML DTD? Thanks in advance. Raphael
3
3096
by: Sarah Haskins | last post by:
I have a few questions about this problem I'm having involving XML, DTD, and XSL. I'm working with this DTD which defines a stylesheet, as such... <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="abc-xsl.xsl"?> <!ELEMENT ABCMessage (Tag1, Tag2, Tag3, Tag4, Tag5, Tag6, Tag7, Tag8*)> <!ATTLIST ABCMessage
4
9214
by: Jens Riedel | last post by:
Hi, I use a select box with a fix width (via stylesheet). So some of the entries are cut on the right side if they're too long. Is there a way to display them complete like a tool tip on a mouseover? Thanks, Jens
2
2816
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/authoring-faq Posting-Frequency: twice a week (Mondays and Thursdays) Last-modified: August 28, 2002 Version: 1.15 URL: http://css.nu/faq/ciwas-aFAQ.html Maintainer: Jan Roland Eriksson <rex@css.nu> ciwas stylesheet authoring FAQ v1.15 ______________________________________________________________________
4
29381
by: Wim Roffal | last post by:
On my webpage (http://www.classiccat.net/index.htm) I tried to transfer the cellpadding/spacing attributes to my stylesheet. However, somehow it doesn't work. I tried to look it up on the internet, but it seems to me that I am doing everything right, which is obviously not the case. It concerns the tables in the alphabetic part of the page. I have there a table-class "block" defined. It works fine in giving the tables their...
0
1954
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/authoring-faq Posting-Frequency: twice a week (Mondays and Thursdays) Last-modified: April 10, 2003 Version: 1.16 URL: http://css.nu/faq/ciwas-aFAQ.html Maintainer: Jan Roland Eriksson <rex@css.nu> ciwas stylesheet authoring FAQ v1.16 ______________________________________________________________________
19
9271
by: deko | last post by:
Firefox will not take the following "font-weight:bold" directive in my stylesheet. Works fine in IE. #rightMenuText h5 { font-weight:bold; padding-bottom:0px; padding-top: 10px; margin-bottom:0px; }
7
5202
by: pintihar | last post by:
Hi, As a follow on from an earlier post I have another question about xslt. Is it possible to create the stylsheet programatically? Is this sensible? In the first phase I needed to map element name from inbound xml to my internal elements to standardize disparate input. Now I could just create an xslt stylesheet for each possible inbound format and be done, but I think it would be powerful to be able store this mapping in a database and...
26
2874
by: happyse27 | last post by:
Hi All, Thanks in advance.... I saw this website www.spatec.com.sg... And saw the slidedown menu bars of "home" "about spatec", how to create this menu bar using which html item? The home if I dont click on it the menu bar wont drop down(i hope it is not java click mouseover function as I hope to use perl and html to achieve same thing, or can I embed java in perl or html? Also, the main menu bar template index.html always is...
0
8380
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8816
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8710
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8598
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2721
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1928
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.