How can I locate the default style sheet for a browser?

20,383

Solution 1

Solution 2

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

Or just open resource://gre-resources/forms.css in Firefox.

Solution 3

Inspect html elements in the browser and find the css rules at the bottom right. You will find user agent styles or browser's styles (in Firefox named as html.css). copy the file location and open it in the tab - there you go.

Location default stylesheets

Firefox - resource://gre-resources/html.css
Chrome - https://chromium.googlesource.com/chromium/blink/+/master/Source/core/css/html.css

you can find for others.

Solution 4

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

Solution 5

In Mozilla Firefox enter this link to the address field: jar:file:///Applications/Firefox.app/Contents/Resources/omni.ja!/chrome/toolkit/res/

Here you will find all the default styles for Firefox. There are separate stylesheets for counters, forms, full-screen, general html, math, numbers, plain-text, quirks, ua, and viewsource.


For a more complete list of user agent stylesheets, see here.

Share:
20,383
jr.
Author by

jr.

Updated on July 24, 2022

Comments

  • jr.
    jr. almost 2 years

    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?