W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2019

Re: [csswg-drafts] [css-ui] consider requiring that descendants do not contribute to outline (#2846)

From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
Date: Tue, 26 Feb 2019 23:01:53 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-467651032-1551222112-sysbot+gh@w3.org>
The CSS Working Group just discussed `Outline around descendants`.

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: Outline around descendants<br>
&lt;fantasai> ScribeNick: fantasai<br>
&lt;astearns> github: https://github.com/w3c/csswg-drafts/issues/2846<br>
&lt;fantasai> heycam: A little whiel ago I bourgh tup the fact that in Gecko we include a lot of descendant boxes when rendering outlines<br>
&lt;fantasai> heycam: and we do get some compat issues from that<br>
&lt;fantasai> heycam: because essentially in Blink and WebKit, and I didn' trecently test Edge, outline only is derived from the position and size of that element's principle box<br>
&lt;fantasai> s/principle/principal/<br>
&lt;fantasai> heycam: Different things happen<br>
&lt;fantasai> heycam: but the important difference is that no descendants contribute to the outline position or size<br>
&lt;fantasai> heycam: Definition fo outline in the spec is deliberately vauge so that UAs can do something fancy<br>
&lt;fremy> q+<br>
&lt;fantasai> heycam: but there is a suggestion that descendants should contribute to the outline<br>
&lt;fantasai> heycam: but I'm suggesting that we switch the suggestion to say that they should not<br>
&lt;fantasai> iank_: ...<br>
&lt;fantasai> iank_: The tl;dr is that there's the outline proeprty which renders one way, and e agree that it shouldn't include descendants<br>
&lt;fantasai> iank_: but then there's the focus outline, when an element is focusable and you focus it<br>
&lt;fantasai> iank_: You might want to handle that a different way<br>
&lt;fremy> q- since I was basically gonna bring up the focus outline side of things<br>
&lt;fremy> 1-<br>
&lt;fremy> q-<br>
&lt;fantasai> florian: The spec view of the problem is that there's an outline -style called auto, which allows you to be crazier in how you do your outline<br>
&lt;fantasai> florian: You can do whatever you want<br>
&lt;fantasai> florian: Intent is that browsers implement focus outline with that<br>
&lt;fantasai> florian: What UAs actually do, may be it's different<br>
&lt;fantasai> emilio: outline-style: auto not only changes shape of outline, but also uses the system focus outline style<br>
&lt;fantasai> emilio: Firefox does something weird on Linux, because bugs, but that's it<br>
&lt;fantasai> emilio: it should otherwise match the OS<br>
&lt;fantasai> emilio: Not just about channging shape but also style<br>
&lt;fantasai> gregwhitworth: was curious about removing descendants from outline<br>
&lt;fantasai> gregwhitworth: I don't want removing descendants from focus to be the default<br>
&lt;fantasai> iank_: I think we agree<br>
&lt;fantasai> iank_: the behavior that I think we want is for the outline property, it doesn't include descendants<br>
&lt;fantasai> iank_: but for focus outline it does<br>
&lt;fantasai> florian: Define focus outline<br>
&lt;fantasai> gregwhitworth: Rob Dotson and Alice Boxhall were thinking that it shouldn't follow descendants<br>
&lt;fantasai> gregwhitworth: but currently it does<br>
&lt;fantasai> iank_: Why for focus outline, by default, should it enclose descendants?<br>
&lt;astearns> s/Dotson/Dobson/<br>
&lt;fantasai> gregwhitworth: Because the scenarios where it's a problem, I can find just as many where not enclosing is also a problem<br>
&lt;fantasai> gregwhitworth: Many cases where Chrome's rendering looks weird e.g. in FB on Chrome<br>
&lt;fantasai> gregwhitworth: Other cases it looks weird<br>
&lt;fantasai> gregwhitworth: e.g. wrapping around weird pseudo-elements<br>
&lt;fantasai> iank_: Would it change your opinion if it didn't have the weird squiggle and just had a bounding rect (instead of non-rectangular shape)<br>
&lt;fantasai> gregwhitworth: That's happening because looping in descendants<br>
&lt;fantasai> iank_: You could have an alternate implementation that's just a bounding rect<br>
&lt;fantasai> gregwhitworth: I'd be more OK with that<br>
&lt;fantasai> gregwhitworth: Saying that these few sites, we no longer care about descendants, seems odd<br>
&lt;fantasai> iank_: We need to check with Alice and Rob, but there disn't seem to be a use case for non-rectangular focus outline<br>
&lt;fantasai> iank_: thinking about simplifying and just doing the bounding box<br>
&lt;fantasai> iank_: Then the question is in that state, what's the best calculation?<br>
&lt;astearns> q?<br>
&lt;fantasai> fremy: Reason why important for focus outline to include descendants, e.g. if you have inline links and a position absolute element<br>
&lt;fantasai> fremy: If you don't include abspos element, you aren't able to actually show the focus ring around the link<br>
&lt;fantasai> fremy: I'm curious if you can do it with one single rectangle<br>
&lt;fantasai> fremy: because if the link element is in one part of the page but the abspos item that is the clickable target is elsewhere, there's a large rectangle around the page<br>
&lt;fantasai> heycam: ...<br>
&lt;florian> q+<br>
&lt;bkardell_> can someone repeat what iank just said?<br>
&lt;fantasai> iank_: Splitting the discussion slightly, sounds like everyone would be fine if the non-auto outline style ...<br>
&lt;fantasai> iank_: sounds like we'd be fine with it not including descendants and just being the border box<br>
&lt;Rossen> [high contrast slides link] https://lists.w3.org/Archives/Public/www-archive/2019Feb/0000.html<br>
&lt;fantasai> florian: Want to clarify definitions<br>
&lt;fantasai> florian: The definition of focus outline that is in the issue that you refer to<br>
&lt;fantasai> florian: includes some cases of the proeprty-based outline<br>
&lt;fantasai> florian: In the issue now there is the definition of focus outline being either:<br>
&lt;fantasai> florian: a) the outline painted whichever way while the element is in focus or<br>
&lt;fantasai> florian: b) when the outline-style is auto<br>
&lt;fantasai> atotic: That's how it's implemented in Chrome atm<br>
&lt;astearns> ack florian<br>
&lt;fantasai> florian: Alternate definition is "only outline when element is in focus"<br>
&lt;fantasai> Another definition woudl be only when it's non-auto...<br>
&lt;emilio> q+<br>
&lt;fantasai> gregwhitworth: You need to be focussed and outline<br>
&lt;xfq> ack fantasai<br>
&lt;emilio> fantasai: so this definition is a little weird, let's say I set an outline: solid purple on a link<br>
&lt;emilio> fantasai: and the behaviour will change depending on whether we focus the link<br>
&lt;emilio> iank_: this is what we currently implement today<br>
&lt;emilio> fantasai: we need a definition that doesn't do that<br>
&lt;fantasai> fantasai: same outline derived from the same style rule shouldn't behave differently when I focus the element and then go back to behaving different when it's unfocus<br>
&lt;bkardell_> it is still a problem<br>
&lt;bkardell_> q+<br>
&lt;emilio> jensimmons: outline: 0 no longer appears on CSS resets anymore<br>
&lt;emilio> jensimmons: nor frameworks. Of course some people still do that but...<br>
&lt;florian> q+<br>
&lt;fantasai> jensimmons: Word has gotten out, don't do that. Of course ppl still do it, but it's getting better<br>
&lt;xfq> ack emilio<br>
&lt;fantasai> emilio: I'm a bit confused. Firefox used to conditionally include both in-flow and out-of-flow descendants for all kinds of outlines<br>
&lt;tantek> for the record, that was fixed in Eric Meyer's CSS Reset back in 2011: https://meyerweb.com/eric/tools/css/reset/<br>
&lt;fantasai> emilio: Then xidorn changed to only include in-flow elements<br>
&lt;fantasai> heycam: I think only for abspos<br>
&lt;fantasai> emilio: As far as I understand, one of the use cases we want to bring back...<br>
&lt;fantasai> emilio: Does Blink include auto flows in their descendant stuff?<br>
&lt;fantasai> s/auto flows/overflow/<br>
&lt;fantasai> s/overflow/out-of-flow/<br>
&lt;fantasai> atotic: It depends. Only if the outline is around the containing block<br>
&lt;fantasai> emilio: Ancestor containing block?<br>
&lt;fantasai> atotic: *emphatic shrug*<br>
&lt;fantasai> emilio: I agree thwith fantasai that having two different behaviors depending on whether focused or not is very weird.<br>
&lt;fantasai> emilio: Maybe take greg's advice to give authros control<br>
&lt;fantasai> atotic: Our behavior is OK because we don't do bounding box, if boxes are disjoint then they each get outlined<br>
&lt;fantasai> atotic: Now that merging boxes, less tolerable<br>
&lt;fantasai> florian: Two kinds of merging boxes<br>
&lt;fantasai> florian: One is when boxes are not next to each other, have a box around each<br>
&lt;fantasai> florian: Other is when they touch each other have either a non-rectangular outline that wraps both<br>
&lt;fantasai> florian: or boundign box<br>
&lt;gregwhitworth> I'm not seeing Chrome wrap this abspos in focus: https://jsbin.com/muyemusofo/1/edit?html,css,output<br>
&lt;fantasai> florian: E.g. For Presto, if two fragments being outlined are not adjacent, you get two outlines<br>
&lt;fantasai> florian: but if they are adjacent, you get one non-rectangular outline around the whole shape<br>
&lt;fantasai> florian: There are nuances within this<br>
&lt;fantasai> emilio: I think we should come up with a consistent plan<br>
&lt;florian> q?<br>
&lt;xfq> ack b<br>
&lt;iank_> q+<br>
&lt;fantasai> bkardell_: I think it is still a pretty significant problem that part of the reason historically that developers couldn't tap into the right thing to say whether you even should draw the outline because didn't have :focus-ring<br>
&lt;fantasai> bkardell_: Will help when :focus-visible is implemented everywhere. Also :focus-visible-within<br>
&lt;fantasai> bkardell_: I've seen a lot of ppl make comments about confusion around outline<br>
&lt;fantasai> bkardell_: Maybe we should really have two properties<br>
&lt;fantasai> fantasai: or a switch between behaviors<br>
&lt;fremy> q?<br>
&lt;fantasai> bkardell_: Using same thign for two purposes seems quite strange<br>
&lt;fantasai> bkardell_: We tell ppl don't use border, use outline for focus rectangles<br>
&lt;fantasai> bkardell_: So we could use borders<br>
&lt;fantasai> bkardell_: Maybe have a thing that's about focus rectangle<br>
&lt;fremy> +1 to what fantasai just said (minuted below)<br>
&lt;fantasai> fantasai: I think there was a proposal at some point to have 'outline-style: auto' be the one intended for focus rings, which has the special behaviors of going around descendants or being non-rectangular or whatever (up to UA)<br>
&lt;fantasai> fantasai: and other outline-style values give a more normalized outline shape, appropriate for extra "border" looking things<br>
&lt;xfq> ack fl<br>
&lt;astearns> q+ bkardell_<br>
&lt;fantasai> florian: We have half of this. When outline-style is auto, it's reasoanble to  assume this is being used for focus. I don't think ppl use it for decorative styles<br>
&lt;fantasai> florian: Other half is less clear. It's often used decoratively, but not strictly<br>
&lt;gregwhitworth> q+<br>
&lt;fantasai> florian: We can spec the auto style to be just the right thing for outline styles<br>
&lt;fantasai> florian: Maybe time will help<br>
&lt;fantasai> florian: When we get around finalizing spec and implementation, once we have multipel borders or gradients within borders, maybe ppl will use those instead of outliens<br>
&lt;gregwhitworth> inline desc are wrapped https://output.jsbin.com/gimiwigije/1<br>
&lt;fantasai> florian: but we don't have that yet. And might take awhile for ppl to move over<br>
&lt;fremy> q?<br>
&lt;emilio> q+<br>
&lt;xfq> ack iank<br>
&lt;fantasai> iank_: The otehr thing is for accessibility sue case, we don't ahve the right people in the room, so it will be a lot of tiem with our a11y experts to not break a11y in this space<br>
&lt;fantasai> fremy: I work on that, btw<br>
&lt;fantasai> gregwhitworth: melanierichards is also here<br>
&lt;xfq> ack bk<br>
&lt;fantasai> bkardell_: It feels like we're not really serving the best use cases that we could<br>
&lt;fantasai> bkardell_: Alice and I have talked around about this, just recently Eric Meyer was doing some stuff at An Event Apart, talking about his frustrations about how to make thigns that are both beautiful and accessible<br>
&lt;fantasai> bkardell_: it's pretty hard<br>
&lt;fantasai> bkardell_: You don't have a lot of control over what outlines can look like just with outline, and if you have a really beautiful design, you end up having to do a lot of design specifically for the outline as well<br>
&lt;tantek> Are there specific examples of such "really beautiful design" where this is a challenge?<br>
&lt;fantasai> bkardell_: A lot of OSes have developed what I assume is glowy outlines<br>
&lt;fantasai> bkardell_: an advantage is that there's a light path and a dark path, and you'll be able to see at least one of them<br>
&lt;fantasai> bkardell_: so when he was working on that, we came up with a hack to make multi-colored pseudo-border outlines that don't affet layout<br>
&lt;fantasai> bkardell_: we could serve taht better and more appealing, then more likely ppl make accessibile things<br>
&lt;fantasai> bkardell_: as Alice says, I assume devs want to do the right thing, just if we make it harder they're less likely to<br>
&lt;xfq> ack greg<br>
&lt;fantasai> gregwhitworth: I 100% agree with bkardell_<br>
&lt;fantasai> gregwhitworth: We are currently finishg up a study with 160 users on focus testing, for this reason<br>
&lt;fantasai> gregwhitworth: because we belive the one in Chromium is not sufficent<br>
&lt;fantasai> gregwhitworth: One issue is wht bkardell_ brought up<br>
&lt;fantasai> gregwhitworth: we also looked into prototyping always-visible outlines<br>
&lt;fantasai> gregwhitworth: to provide sufficient contrast<br>
&lt;fantasai> gregwhitworth: I saw emeyers' scenario of always wanting to ensure high contrast<br>
&lt;fantasai> gregwhitworth: What's interesting is that Mozilla has a property that they propsed eyars ago to effectively provide an inversion color as a color keyword<br>
&lt;fantasai> gregwhitworth: so you can use a keywrod where youc an't sue the inversion value<br>
&lt;fantasai> gregwhitworth: It's just that it looks realy gross when you want a great design<br>
&lt;fantasai> gregwhitworth: two things taht came up out of that testing<br>
&lt;fantasai> gregwhitworth: one, doing a good focus rect in browser sucks<br>
&lt;fantasai> gregwhitworth: doesn't follow border radius is problematic<br>
&lt;fantasai> gregwhitworth: I had to hack with border outline and drop-shadow to get the right effect<br>
&lt;fantasai> gregwhitworth: I think we should tease out the pieces of following the rect<br>
&lt;bkardell_> tantek does greg's expanding answer your question?<br>
&lt;fantasai> gregwhitworth: also want to have gradient<br>
&lt;fantasai> gregwhitworth: Similar to ...<br>
&lt;fantasai> gregwhitworth: In addition, emilio's proposal of whether or not you want to include descendants or not<br>
&lt;fantasai> gregwhitworth: will share more publicly once we have the report<br>
&lt;fantasai> emilio: what he said.<br>
&lt;xfq> q?<br>
&lt;emilio> q-<br>
&lt;xfq> ack emilio<br>
&lt;fantasai> heycam: It think most important thing given distinction between focus outlines and decorative outlines<br>
&lt;fantasai> heycam: We should write down which particular descendants get included, because that's the particular difference betwen FF and other browsers that's an issue for us<br>
&lt;fantasai> heycam: At the moment, we include all in-flow descendants<br>
&lt;fantasai> gregwhitworth: I have interop on all 3 browsers in Windows<br>
&lt;fantasai> [discussion about testing]<br>
&lt;fantasai> heycam: I only tested normal outlines, and definitely saw differences<br>
&lt;fantasai> emilio: Also Firefox only changed recently, might want to test Nightly<br>
&lt;fantasai> astearns: Sounds like we won't resovle anything right now, but we need to figure out interop<br>
&lt;fantasai> astearns: First thing to figure out as we go through these issues in addition<br>
&lt;fantasai> heycam: So next step is wait for this report?<br>
&lt;fantasai> ACTION: gregwhitworth open issues against outline on all the aforementioned issues<br>
&lt;trackbot> Created ACTION-877 - Open issues against outline on all the aforementioned issues [on Greg Whitworth - due 2019-03-05].<br>
&lt;fantasai> astearns: Let's keep this issue on descendants and open more issues for the rest<br>
&lt;fantasai> astearns: OK that's it for this topic!<br>
&lt;fantasai> BREAK TIME<br>
&lt;fantasai> &lt;br type=tea><br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2846#issuecomment-467651032 using your GitHub account
Received on Tuesday, 26 February 2019 23:01:55 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:44 UTC