-
Notifications
You must be signed in to change notification settings - Fork 720
[css-borders-4] Specify how corner-shape
affects outline
#12194
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
Agree that we should aggressively cap the ability of corners to extend too much in a concave outline. I'm fine with a round miter, tho I don't think that's expressible in SVG right now? ( |
I think the property you're looking for is |
When using an outline, use the border path's stroke as the outline clip path. This technique is possible in outlines and not in borders, because the outline thickness cannot change between sides. Using round stroke caps/joins to avoid very long miters. This is discussed in the CSSWG (w3c/csswg-drafts#12194) and can be amended if something else comes up, however currently outline rendering is not specified in an interoperable way, so adding the tests as regular pixel web-tests. Note that dashed/dotted outlines are still not rendered correctly, so not adding tests for them. The same goes for auto outlines, and for complex outlines that span multiple boxes. Bug: 417420173 Change-Id: I16bbae1b1ea3e5a29a33b6e60ae6a8c381082e4e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6551430 Reviewed-by: Fredrik Söderquist <fs@opera.com> Commit-Queue: Noam Rosenthal <nrosenthal@google.com> Cr-Commit-Position: refs/heads/main@{#1462900}
Proposed async resolution: |
Thinking further, should |
I don't think the outline should be affected by the present of a border? |
I tried this a bit and it has parts that don't make sense or need further clarification:
Judging from how current outline wording is written, I believe this can be worded in a way that leaves it to implementations. |
The CSS Working Group just discussed
The full IRC log of that discussion<emilio> noamr: there was a question about how does corner-shape matches outline. Current spec is not interoperable, rather handwavy<emilio> ... spec says it generally should follow the border <emilio> ... should I continue that path for border-shape? <florian> q+ <emilio> ... following the border <emilio> Q+ <emilio> ... should we try to make that interoperable? <astearns> ack florian <emilio> florian: I think short term is to extend the current spec <emilio> ... going beyond it is a big project, there are a lot of other issues with outline <emilio> ... defining would be a good project but a big project <astearns> ack emilio <fantasai> [missed] <fantasai> emilio: we have the magic thing, which is outline-style: auto <fantasai> emilio: for easy cases we can more easily define <fantasai> emilio: handwaving fragmentation cases can be fine <fantasai> emilio: agree we shouldn't need to fix everything <fantasai> emilio: but let's get interop on some cases <fantasai> florian: two resolutions <fantasai> florian: 1. Follow corner-shape <fantasai> florian: 2. WG will attempt to outline in more detail <fantasai> florian: we don't have a definition, but we can try <fantasai> emilio: the non-auto cases seem pretty definable <fantasai> florian: definable, but is not currently defined <fantasai> florian: I used to have an art gallery of interesting outline rendering, so there is a lot to define! <fantasai> astearns: out of time, but I think it sounded like we have consensus to at least add corner-shape to the bit that defines how we deal with border-radius <fantasai> astearns: add it to that vagueness, and perhaps a note to better specify this later <fantasai> noamr: sgtm <fantasai> florian: I agree with the direction, probably issue rather than note though <fantasai> noamr: open a separate issue <fantasai> PROPOSED: Add corner-shape to the border-radius clause in outline <fantasai> RESOLVED: Add corner-shape to the border-radius clause in outline definition |
I want to point out that just using rounded |
@Loirooriol I agree with you that there is a lot of undefined territory in outlines, and that bringing in outline-offset allows for some pretty crazy situations. Reminds me of this old thread: https://x.com/Martijn_Cuppens/status/1015169981368225793 |
So what's the conclusion here? Is the outline with rounded corners even if the corner-shape value is Please reopen this issue, I think the specification needs to be updated. |
No, it should follow the curve, but without specifying more than that, as outline in general is not specified to that extent.
I agree, there needs to be a note about this before closing. Reopening and will close with a note PR. |
…-shape Resolution: w3c#12194 (comment) Closes w3c#12194
…-shape (#12278) Resolution: #12194 (comment) Closes #12194
Follow up to #11610 (comment).
Outlines are "special" because they create a path that's external to the original border, more like a stroke.
A concave corner (e.g. a star of
scoop
shape) with a big outline might end up with very long miters.Note that currently
outline
rendering is specified in pretty vague terms.Proposing (based on suggestion from @smfr) to advise implementations to render a round miter for concave corner-shaped outlines.
The text was updated successfully, but these errors were encountered: