Skip to content

[css-cascade] User stylesheets, UA stylesheets - still something we expect to be real? #2237

@svgeesus

Description

@svgeesus

CSS 2.2 section 3.2 UA conformance:

UAs must allow users to specify a file that contains the user style sheet. UAs that run on devices without any means of writing or specifying files are exempted from this requirement. Additionally, UAs may offer other means to specify user preferences, for example, through a GUI.
https://drafts.csswg.org/css2/conform.html#conformance

Microsoft Edge does not support User Stylesheets.
https://msdn.microsoft.com/en-us/library/hh674753(v=vs.85).aspx

Chrome removed User stylesheets ages ago (chrome 33)
https://bugs.chromium.org/p/chromium/issues/detail?id=347016
https://news.ycombinator.com/item?id=7329855

The conformance section does not mention UA default stylesheets at all, but they are listed in section 6.4 the cascade:

User agent: Conforming user agents must apply a default style sheet (or behave as if they did). A user agent's default style sheet should present the elements of the document language in ways that satisfy general presentation expectations for the document language (e.g., for visual browsers, the EM element in HTML is presented using an italic font). See A sample style sheet for HTML for a recommended default style sheet for HTML documents.

I came across this again recently in the context of test for Fonts 3. A couple of tests require a particular font to be set in the UA stylesheet. For example font-052 and font-family-rule-004a. Everyone fails those tests, and they have less results than other tests (I guess skipping is easier than finding how to change the UA stylesheet, restarting the browser, then changing it back again for one test).

Do we want to still
a) say that UA stylesheets are a thing
b) insist that they be modifiable by users (as a stylesheet, not as prefs in a dialog box)

If not, then CSS2 should be modified.

if we do, then we need browser vendors on board to expose UA styles to user editing. Otherwise, how can we pass tests like these?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions