0

This relates to this question Chrome get "user agent stylesheet", in which it is suggested that the way to get the current user agent stylesheet is to look at the url http://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css that seems reasonable, especially as (at the time of posing this question) it says it was last edited 3 weeks ago.

However if I look at properties in it the rule for Ol is

ol {
    display: block;
    list-style-type: decimal;
    -webkit-margin-before: 1__qem;
    -webkit-margin-after: 1em;
    -webkit-margin-start: 0;
    -webkit-margin-end: 0;
    -webkit-padding-start: 40px;
}

and if I look in the developer tools at the user agent styles for Ol it is

ol {
    display: block;
    list-style-type: decimal;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    padding-inline-start: 40px;
}

So why the difference? I am assuming that the browser goes through and fixes webkit properties to properties it supports, but why isn't that the case out in the actual stylesheet in the repository (since this stylesheet should only be targeting the browser it seems reasonable it be written directly to the properties the browser supports)

The version of Google Chrome I am running is a managed one controlled by my organizations in-house IT support - in case it turns out this can have some bearing on how the user agent stylesheet is set.

user254694
  • 1,461
  • 2
  • 23
  • 46
  • The ones with -webkit- date from a time before the newer names became standardised. They have the same meaning though. – Mr Lister Oct 30 '19 at 12:46
  • I know they have the same meaning. But I am wondering if anyone knows why the css that as I understand it is the current one in the repository has the webkit properties and the one in my browser (and I assume other people's browsers) shows the actual standard properties. – user254694 Oct 30 '19 at 12:50

0 Answers0