-
Notifications
You must be signed in to change notification settings - Fork 707
[css-ui][css-background] should clarify outline drawing behavior for boxes with negative sizes #2892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Right. At the moment, large negative offsets on outline are mostly a form of interpretive art, with the browser, not the author, doing the interpretation. As the picture from the tweet illustrates, it can be very pretty and highly creative, but interoperable it isn't. The CSS-UI has some minimal "SHOULD" constraints to try and keep it vaguely sane (roughly, to prevent disappearing outlines with extremely large negative offsets), but even that isn't reliably followed yet. We have a test in the test suite that's almost as creative in rendering as that tweet: http://test.csswg.org/suites/css-ui-3_dev/nightly-unstable/html/outline-016.htm It should be a green square, but (This test case needs the Ahem font to be installed) |
(note: this question of interop on outlines relates to #2846: even though we're considering different aspects of the outline, both raise the question of how much we should define) |
(these are unexpectedly beautiful) |
Just one more, because it's fun to let browsers go wild with lack of interop: |
I'll note also that the paragraph applying the SHOULD here doesn't seem to read coherently to me:
I can't quite parse this. |
Can we just upgrade that to:
That way there's no self-intersecting outlines; at worst, the outline starts from the center of the element and grows outward from there. |
https://twitter.com/Martijn_Cuppens/status/1015169981368225793 points out lack of interoperability with the following style:
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:

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.
The text was updated successfully, but these errors were encountered: