W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2017

Re: [csswg-drafts] [selectors] decide on :blank

From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
Date: Wed, 20 Dec 2017 17:34:25 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-353130436-1513791264-sysbot+gh@w3.org>
The Working Group just discussed `decide on :blank`.

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: decide on :blank<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/1967<br>
&lt;dael> fantasai: We had an issue in the spec for name of :blank. It was a request to pick a name. There was a discussion in the past to redefine empty to allow whitepsace inside it.<br>
&lt;dael> fantasai: That's a Q for the WG. Question is do we want to drop :blank and have :empty allow for whitespace or do we want two descriptors? In the second case we need a name for the selector.<br>
&lt;dael> Rossen: Use case?<br>
&lt;dael> fantasai: Most of the time you're trying to pick something empty there's often white space in there. Currently if you try and select empty table cells but you didn't carefully close all tags an make sure there were no spaces then :empty doesn't work.<br>
&lt;dael> glazou: Another reason they're not completely empty is because if there's no content you don't have a frame to rendor and then cannot edit.<br>
&lt;dael> fantasai: There should be a frame<br>
&lt;dael> glazou: Not always.<br>
&lt;dael> glazou: It means we have tons of doc in the wild with whitespaces.<br>
&lt;bradk> :empty-ish<br>
&lt;dael> fantasai: Question is about the selector. We have :empty. We can say it also matches elemnents that contain whitespace. Or we can say it does not match when it has a whitespace in which cae we need another selector that matches to things with nothing or white space.<br>
&lt;Rossen> someone is typing loud<br>
&lt;dael> glazou: I favor the later.<br>
&lt;dael> dbaron: I think :empty has been around long enough that we would break if we changed the behavior.<br>
&lt;AmeliaBR> I liked :blank. But if we need to be more clear, :whitespace-only is as explicit as we can get.<br>
&lt;dael> florian: On the one hand I have a hard time thinking of use case to distinguish, but there is a compat concern and that's what should decide the issue.<br>
&lt;fantasai> AmeliaBR, it might not contain any though :)<br>
&lt;AmeliaBR> (Definitely don't change the current behavior of :empty. That could mess up use cases like using it to show a placeholder for a &lt;div contenteditable><br>
&lt;dael> astearns: Might be somewhat difficult to figure out web compat problems b/c it's likely code that is dealing with interaction.<br>
&lt;dael> glazou: Has MS commented?<br>
&lt;AmeliaBR> :empty-or-whitespace<br>
&lt;dael> Rossen: I'm interested to find out what hte webcompat is. I don't remember if we even impl :empty. I'd be surprised if there's too much interop<br>
&lt;dael> glazou: I was asking about the stats MS has online on props. Does it incl selectors? Do we have metrics?<br>
&lt;dael> glazou: On :empty usage<br>
&lt;dael> Rossen: I'll take a look at what the crawlers have seen. I'd be surprised if it's wildly used.<br>
&lt;dael> glazou: Me too.<br>
&lt;dael> astearns: Whether or not it's possible to redefile :empty is there a reason to have both?<br>
&lt;dael> Rossen: I'd be in favor of the simple way to only have :empty that fantasai desc<br>
&lt;bradk> :mostly-empty<br>
&lt;dael> astearns: Shall we need the issue as needs data?<br>
&lt;dael> fantasai: Yes<br>
&lt;dael> Rossen: Looking at CSS usage I don't see hits for :empty. fwiw there's nothing we find.<br>
&lt;dael> glazou: So nothing prevents us from redefining it?<br>
&lt;dael> Rossen: THat's my read. If anyone has data for the contrary I'm willing to take a look. On our end I don't see anything.<br>
&lt;dael> fantasai: To be clear the case that would break is if someone uses :empty and expects it not to select an element that includes whitespace.<br>
&lt;fantasai> s/whitespace/only whitespace/<br>
&lt;dael> Rossen: That sounds to me like a fringe case. This could be a toolability work around where an editor is carefully adding and removing and this is selecting only things not edited by a user yet. But this is an edge case. I'd say we should make the change.<br>
&lt;dael> glazou: Case where element is content:Editable and you wan tto make difference between entirely empty and whitespace is there.<br>
&lt;glazou> s/content:Editable/contenteditable<br>
&lt;dael> dbaron: [missed] someone tried to use :empty, it didn't work, they didn't remove it and then it suddenly matches.<br>
&lt;dael> Rossen: If we find those use cases let's discuss, but I don't see any usage.<br>
&lt;dael> astearns: Prop is redefine :empty to allow whitespace and to remove :blank<br>
&lt;dael> astearns: Obj?<br>
&lt;dael> glazou: I don't like it. I'd prefer preserve :empty and have a selector for both.<br>
&lt;dael> florian: You think there's a case for one or the other?<br>
&lt;dael> glazou: THen you can write a more coplex selector.<br>
&lt;dael> astearns: I thought you argued before where when you want a blank thing...<br>
&lt;dael> glazou: I was misunderstood. I want the two features to be able to handle sep.<br>
&lt;bradk> :empty(ws)<br>
&lt;dael> fantasai: The case where you only care about non-whitespace is the more common.<br>
&lt;AmeliaBR> Example of the contenteditable usecase, would be weird if it treated a space as empty: https://codepen.io/AmeliaBR/pen/QvMGmR?q=%3Aempty&amp;limit=mine<br>
&lt;dael> dbaron: This doesn't feel like the kind of thing where we want to spend a lot of resources on testing for compat. Breaking changes are a lot of work<br>
&lt;dael> astearns: From the principle of less work, proposal is keep current definition of :empty and keep current definition of :blank and have people impl :blank if the empty with whitespace use case is useful.<br>
&lt;dael> dauwhe: Is there concern we have a blank pseudo class in pages?<br>
&lt;dael> astearns: Same syntax?<br>
&lt;dael> dauwhe: In a page context, but it's :blank. I think in an @rule<br>
&lt;dael> astearns: Does that @rule select paes with only whitespace?<br>
&lt;dael> dauwhe: Pages created by rendering engine that don't have content.<br>
&lt;fantasai> https://www.w3.org/TR/css-page/#blank-pseudo<br>
&lt;dael> florian: So it maches :empty not :blank<br>
&lt;dael> dauwhe: Yeah, although you can make master pages with content that match :blank<br>
&lt;dael> dauwhe: prob not confusing for most, but woth mentioning<br>
&lt;fantasai> :empty-ish<br>
&lt;dael> astearns: So an argument to change :blank name to :whitespace-only or something<br>
&lt;dael> astearns: First, would anyone obj to keeping :empty with current definition and havin a selector that means empty or whitespace.<br>
&lt;dael> florian: Not an obj, but I'm not sure keep things the way it is is really less work. People need to impl a new thing.<br>
&lt;dael> dbaron: But if we change empty people impl the new thing too.<br>
&lt;dael> astearns: Work we're avoiding is the web compat check.<br>
&lt;dael> Rossen: My position is if we're keeping :empty let's keep as-is. If we're changing lets do so completely and have something that's the superset. If we don't care about webcompat let's not. But if we keep :empty as is 'd oppose to change empty and have a selector that means something kinda like :empty<br>
&lt;dael> astearns: Yeah, I don't think that's on the table.<br>
&lt;dael> Rossen: THe last proposal I heard was change :empty<br>
&lt;dael> florian: No, fix empty to mean what blank means or get both.<br>
&lt;dael> fantasai: We have an empty cells prop for tables that behaves like :blank. It triggers when there's white space. So there's a comflict in meaning.<br>
&lt;dael> fantasai: I wouldn't obj to keeping things the way they are, but I would be annoyed because I've found the way :empty was defined to be annoying.<br>
&lt;dael> astearns: Two avenues and there are people that would obj or be unhappy with both.<br>
&lt;fantasai> https://www.w3.org/TR/CSS2/tables.html#empty-cells<br>
&lt;dael> Rossen: Do we go back to GH and see if we can argue more there?<br>
&lt;dael> fantasai: I'd like to talk with glazou more offline on his concerns.<br>
&lt;dael> astearns: Was there previous discussion on redefine empty?<br>
&lt;dael> fantasai: Yes, but nothing formal. When it was first defined I believe it was discussed and people were saying if there's a text node in the dom it's not empty, but that's not how people go about styling their pages.<br>
&lt;dael> astearns: I think we've had enough on the call. fantasai and glazou can discuss and summerize on GH.<br>
&lt;dael> dbaron: One other point is elements like :pre where whitespace is significant.<br>
&lt;astearns> https://lists.w3.org/Archives/Public/www-style/2017Nov/0018.html<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1967#issuecomment-353130436 using your GitHub account
Received on Wednesday, 20 December 2017 17:34:28 UTC

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