Bug 178224 - outline-width affecting padding, not the width of the outline.
Summary: outline-width affecting padding, not the width of the outline.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: FromImplementor
Depends on:
Blocks:
 
Reported: 2017-10-12 12:11 PDT by Rob Dodson
Modified: 2022-07-15 14:17 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Dodson 2017-10-12 12:11:36 PDT
According to MDN: "The outline-width CSS property sets the width (thickness) of an element's outline."

In Safari setting the outline-width property affects the distance between the element and the outline. But the outline itself is always the same width.

Example: http://jsbin.com/tegisinedo/1/edit?html,output

Clicking on the element in the above example should draw a 20px wide outline. This is the behavior in Firefox and Chrome. In Safari it instead puts 20px of padding between the element and the outline.
Comment 1 Rob Dodson 2017-10-12 12:27:54 PDT
It looks like this is a differing opinion between the browsers.

In Chrome and Firefox if you set outline-width, it will use the default focus indicator and just change its width.

In Edge, if you set outline-width it will remove any default styling so it appears as if it’s gone. If you additionally set outline-style: solid, then the ring reappears and properly applies outline-width.

In Safari, if you set outline-width it will affect the padding between the outline and the element. If  you additionally set outline-style: solid, then the ring will be drawn to the correct width.
Comment 2 Simon Fraser (smfr) 2017-10-13 08:03:17 PDT
You should raise a GitHub issue in the CSSWG.
Comment 3 Brent Fulgham 2022-07-15 14:17:02 PDT
Did any such issue get raised? Is there any action to take here?