Re: [csswg-drafts] [css-pseudo-4] ::selection vs ::inactive-selection (#4579)

Missed minutes:

dael> Topic: [css-pseudo-4] ::selection vs ::inactive-selection
<dael> fantasai: Started discussing last week, came up with...discussion was why not have a MQ intead of two pseudos. Then we ran out of time.
<dael> fantasai: Do we want to go in that direction and drop inactive selection from spec and add a MQ to MQ5?
<dael> s/inactive selection/::inactive-selection
<dael> astearns: Use case for inactive MQ outside of selection?
<dael> fantasai: Probably. There's some JS methods that allow you to detect that
<fantasai> https://github.com/w3c/csswg-drafts/issues/4579#issuecomment-572188785
<dael> astearns: Main difference is instead of having to fully spec both styling you can do all your selection styling and have an inactive override to might reduce duplication
<dael> fantasai: We have to do that anyway b/c selection is when window is inactive. Whatever way we take it needs to apply. 3 ways to do it, 2 are in the issue and 3rd is do in a MQ where you can do inactive anything
<dael> AmeliaBR: Selection styles always apply active or not is what we have. DOesn't match browser styles. I like MQ idea and have benefit of being able to do things like pause animations and transitions which is more consistent with request animation frame transitions
<dael> smfr: Need to be a little careful with window activation. An iframe without focus is inactive color. It's focus state of document maybe.
<dael> smfr: Wondering case about inactive selection with the same document as active selection. There may be scenarios like that
<dael> AmeliaBR: Interesting. Then inconsistent with page visibility APIs concept of activeinactive. Useful to have specific examples of which browsers and OS conventions do have those distinguishments between this selection is preserved but not currently active and the cases where that can happen
<dael> astearns: I'd want to make sure the MQ had as much of same behavior as page visibility API. Doesn't seem like should be a difference if we can manage it
<dael> fantasai: Then it's not same as ::inactive-selection. When you have ::inactive-selection and ::active-selection in the same page we need the pseudo
<dael> fantasai: Other idea taken up during previous call was a selector on the element that says hey this element is focused so make selection this color. Some word that represents being selectable in an active way. Don't know if it would work
<dael> AmeliaBR: That would cover case of text area preserving selection even when text area doesn't have focus. A pseudo class on text area and then selection style with regular selection element?
<dael> fantasai: Yeah, I think so. but then...I don't know...need to think about cascading
<dael> fantasai: That's good points, we should move to another issue. We won't solve now.
<dael> astearns: I'm still interested to see if an inactive MQ would be useful, but may be out of scope for this problem
<dael> astearns: Let's continue in GH and maybe on agenda for next week

-- 
GitHub Notification of comment by astearns
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4579#issuecomment-574792018 using your GitHub account

Received on Wednesday, 15 January 2020 18:31:44 UTC