Skip to content

[css-ui][css-background] should clarify outline drawing behavior for boxes with negative sizes #2892

Open
@dbaron

Description

@dbaron

https://twitter.com/Martijn_Cuppens/status/1015169981368225793 points out lack of interoperability with the following style:

div {
  margin: auto;
  width: 100px;
  height: 100px;
  outline: inset 100px green;
  outline-offset: -125px;
}

This is creating a 100px×100px box, and then offsetting its outline by -125px, which creates an outline whose inner edge is a box that's a -150px×-150px rectangle and whose outer edge is a 50px×50px rectangle.

Quoting the tweet's image:
Screenshots

The behavior of this case (outlines drawn over a rectangle that has negative sizes) should probably be better defined so that browsers can become more interoperable here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions