views:

1550

answers:

8

I would like to see the specific style elements that are used in the default stylesheet for the various browsers. Do the browsers have an actual file based stylesheetss that I locate on my system and read? If so, what are the default locations of those files? If not, where I can find this information?

A: 

Some do some don't. (on a slightly different subject) I would recommend using a reset stylesheet.

http://developer.yahoo.com/yui/reset/

nlaq
I use reset-fonts-grids/reset-fonts-grids.css. I can see what is being reset, I also want to see what each style is being reset from.
jr
Great point, but doesn't answer the question
Sam Soffes
A: 

In Safari, the Web Inspector will show you the CSS cascade for any element, including properties that were overridden, all the way back to the default CSS. Unfortunately, it won't show you the filename for that default CSS, but it will show you what properties were reset. Hopefully that helps a bit.

Justin Voss
+1  A: 

On Firefox, look for res/html.css, and the other CSS files in the same directory.

CesarB
+1  A: 

This may be tangential to the heart of your question, but if I'm right in guessing why you want this information, you may want to check out browsershots.org.

Browsershots makes screenshots of your Web design in different browsers.

In other words, you can see what your website looks like in many different browsers, browser versions, and platforms.

Pistos
A: 

The default stylesheet is generally not available. I recommend starting your own stylesheet with a "reset styles" part, or including reset styles in a style sheet you load first. Eg.

<link rel="stylesheet" type="text/css" media="screen" href="/stylesheets/reset.css"></link>
<link rel="stylesheet" type="text/css" media="screen" href="/stylesheets/general.css"></link>

Eric Meyer ("the" Eric, just google Eric) offers a battle tested and widely used reset style sheet here: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/

Christian Lescuyer
+4  A: 

From the WebKit source respository: http://trac.webkit.org/browser/trunk/WebCore/css/html4.css

Unofficial Grid of several major browsers: http://css-class.com/test/css/defaults/UA-style-sheet-defaults.htm

soypunk
The webkit stylesheet can now be found at <http://trac.webkit.org/browser/trunk/WebCore/css/html.css>
Sam Soffes
A: 

In Opera, on OSX the file is located at /Applications/Opera.app/Contents/Resources/Styles/user.css

Darryl Hein
A: 

soypunk already mentioned the UA style sheet for WebKit.

The UA style sheet for Gecko (in standards mode) consists of ua.css, forms.css and html.css. (See also quirk.css for quirks mode.)

Opera does not have a UA style sheet as a .css file. (user.css mentioned previously is not the UA style sheet. It is the user style sheet.)

hsivonen