Re: [csswg-drafts] [css-selectors] :stuck pseudo-class feature suggestion

Actually, this wouldn't be easy at all, and falls into a class of problems that unlikely to be solvable in CSS: selectors and pseudo classes in particular cannot depend on layout, because otherwise they could be used to modify layout in a way that made them no longer match, which would modify the layout back to where it was, so they match again, and we get stuck in an infinite loop of contradictions.

For a simple example:
:stuck { position: static; }
Now what?

Some of the changes you might want to apply with a `:stuck` pseudo class may be safe and not trigger such loops, but selectors are a generic mechanism, and would enable this kind of contradictions, so even though the problem you're trying to address seems legitimate to me, selectors are unlikely to be the answer.

GitHub Notification of comment by frivoal
Please view or discuss this issue at using your GitHub account

Received on Thursday, 27 July 2017 15:20:09 UTC