Skip to content

[css-ui-4] influence of outline-width on auto style outlines #9201

Closed

Description

@frivoal

CSS-UI claims that it's up to user agents to determine whether and how outline-width influences the rendering of outlines with outline-style auto.

However, this is problematic, for the similar reasons as discussed about color in #7761:

outline: auto sets outline-style to auto and outline-width to medium, and medium means 3px.

The default UA sheet in the HTML spec has :focus-visible { outline: auto; }, and so, in browsers that want to take outline-width into account, it effectively calls for the default rendering of focus outlines to be native outlines somehow tweaked to be 3px wide. That seems unfortunate.

I think we should either:

  • remove the claim that outline-width is allowed to influence the rendering of auto style outlines.
  • similarly to what we did in [css-ui] Tweaking outline-style: auto colors. #7761, allow outline-width to influence the rendering of auto style outlines, but to make that work sensibly, add an auto initial value to outline-width which computes to medium when outline-style is anything but auto, but lets auto style outlines render at their natural size unless the author has explicitly called for something else.

Activity

  1. Loirooriol commented on Aug 16, 2023

    @Loirooriol
    Contributor

    Does any browser let outline-width affect the size auto outlines?

  2. frivoal commented on Aug 25, 2023

    @frivoal
    CollaboratorAuthor

    As far as I know, neither Safari, Firefox, nor Chrome do it.
    As far as my tests could confirm, the only print formatter which does is BFO Publisher.

    @faceless2 is this something that matters to you?

  3. faceless2 commented on Aug 25, 2023

    @faceless2

    If it looks like it might matter to us, it's almost certainly a bug 😁 I thought we simply treated auto as solid - no impact on width at all.

  4. Loirooriol commented on Aug 25, 2023

    @Loirooriol
    Contributor

    If you treat auto as solid, then it's normal for it to be affected by outline-width. Same for Servo.

    I was referring to the native outlines.

  5. frivoal commented on Aug 30, 2023

    @frivoal
    CollaboratorAuthor

    Agenda+ to propose removing the claim that outline-width is allowed to influence the rendering of auto style outlines

  6. css-meeting-bot commented on Nov 1, 2023

    @css-meeting-bot
    Member

    The CSS Working Group just discussed [css-ui-4] influence of outline-width on auto style outlines, and agreed to the following:

    • RESOLVED: Remove the claim that outline-width influences the rendering of auto style outlines
    The full IRC log of that discussion <dael> astearns: This was florian
    <dael> TabAtkins: Look straightforward
    <dael> astearns: Prop: Remove the claim that outline-width influences the rendering
    <dael> astearns: Obj?
    <dael> astearns: Prop: Remove the claim that outline-width influences the rendering of auto-style outlines
    <dael> RESOLVED: Remove the claim that outline-width influences the rendering of auto style outlines
  7. added
    Tested
    and removed on Nov 7, 2023
  8. 13 remaining items

  9. added 3 commits that reference this issue on Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closed Accepted by CSSWG ResolutionTestedcss-ui-4

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions