-
Notifications
You must be signed in to change notification settings - Fork 711
[css-lists] Are outside markers out-of-flow? #4574
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
In https://crrev.com/506884 @kojiishi said:
|
Yes, I think they should be out-of-flow. They act, layout-wise, like an out-of-flow box. |
No, they can't be out-of-flow. That wouldn't be web-compatible. I explained all this in #3771, please read it. |
@MatsPalmgren You explained that markers can't be abspos. Non-positioned out-of-flows are painted more similar to in-flows. So I was wondering if this could be web-compatible. Anyways, even if not backwards-compatible in some cases, would changing it really break websites? |
Introducing a new kind of out-of-flow is a fairly invasive change though. So I think there needs to be strong arguments for doing that. So let's examine your use case again. The argument is that not underlining outside markers "looks better". But if you click the marker in your example it actually navigates, so I think removing the underline also removes semantic value for users (namely that it's part of the link). I'm not sure I agree that aesthetics should trump semantics here. And if you think that it should, then why only outside markers? Surely inside markers would also look better without an underline, right? But then the whole argument for making outside markers out-of-flow for this reason falls. I think that if we want to support this use case then we should address it directly with something like Putting list items inside a link also seems like a rare use case. I'm guessing It's also worth noting that outside markers influence the first line's line-box size so it's not really out-of-flow in the sense that it doesn't affect the in-flow size either. And as I said before, I'm opposed to changing the painting order in any way from what browsers are currently doing. It's a very risky change to make from web-compat perspective and there's nothing to be gained by it. (That said, we could simply spec that they paint with in-flow boxes as before even if we decide to call them out-of-flow for other reasons.) So far, I remain unconvinced that making outside markers out-of-flow is a good idea. I think the arguments for keeping them in-flow are stronger. |
In Chromium LayoutNG, outside markers are implemented as inline-blocks, and text decorations are not supposed to be propagated to atomic inlines. So doing that seemed a bug, which has been fixed as a side-effect of my work for implementing ::marker. Decoration propagations for outside markers are mostly interoperable now, but not for inside ones. Testcase
This is a MAY in the spec. For example Firefox doesn't seem to always do it, so outside markers can seem out-of-flowish. But Chromium does it, so that's a convincing argument against out-of-flow. |
I think conceptually firefox applies the decorations all the time, but we don't apply it to legacy list markers because they have an special painting path. |
Right, it was an accident when I implemented That said, I'm willing to decorate inside markers by default as suggested if we add The table of results above is incomplete though. It appears Chrome (both legacy and LayoutNG) never underlines I tend to think that all types (images excluded obviously) of inside markers should behave the same w.r.t decorations. Outside markers too, whether they have a |
That's because symbol markers are painted specially, it's not actual text (e.g. you still see a disc with
That's because in that case there's a quirk that forces the marker to be inside.
Not in Chromium, it has special layout classes for markers. 5 classes, and adding inline-block inside markers would require 2 extra classes, or maybe refactor them as a mixin or something. Also, if we allow |
The spec used to explain outside markers using
position: marker
, which counted as absolutely positioned, and thus out-of-flow.Then
position: marker
was removed, and in #3771 @MatsPalmgren claims that abspos may not be web compatible. But maybe we can agree on whether they are out-of-flow or not?This matters for example when propagating text decorations:
Consider this testcase:
Should the markers be underlined or not? I think taking them out-of-flow (and thus not underlining them) looks better. I guess they could then be painted at step 5 with "non-positioned floating descendants" https://drafts.csswg.org/css2/zindex.html#painting-order
The text was updated successfully, but these errors were encountered: