Bug 64655

Summary: CSS Transitions and Transforms do not work with ::selection
Product: WebKit Reporter: BrianMB <anewpage.media>
Component: CSSAssignee: Nobody <webkit-unassigned>
Severity: Major CC: anewpage.media, ap, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Description BrianMB 2011-07-16 14:39:12 PDT
::selection is a terrific tool; it enables a ton of opportunity for branding and creativity.

Two major CSS3 features do not work with it: Transitions and Transforms.
Comment 1 Alexey Proskuryakov 2011-07-16 22:36:12 PDT
Could you please attach a test case for the failure?
Comment 2 BrianMB 2011-07-17 10:30:44 PDT
Certainly Alex:
Comment 3 Simon Fraser (smfr) 2011-07-17 10:40:22 PDT
I think this is by design. Selection should not change layout.
Comment 4 BrianMB 2011-07-17 10:54:13 PDT
Hi Simon, I take it you're referring specifically to the Transforms aspect of the bug.

I can think of various scenarios where I would like to play with the transformation of selected content (hence, the filing of the bug, because I found I could not do that).
Comment 5 Simon Fraser (smfr) 2011-07-17 11:32:12 PDT
::selection has been removed from the current CSS3 selectors draft <http://www.w3.org/TR/css3-selectors/#selection>. The previous draft said:

> These are the CSS properties that apply to ::selection pseudo-elements: color, background, cursor (optional), outline (optional). 

and it's unlikely this will change. Altering layout as the user selects both results in a terrible user experience, and and is tricky for the browser to implement.
Comment 6 BrianMB 2011-07-17 13:04:19 PDT
Considering ::selection is probably treated as an inline element internally, it wasn't the right decision from an engineering perspective to include matrix transformations in this ticket (even if I disagree on the UX note; that decision should be left in the hands of the designer).

Filed a more specific ticket to pick up the discussion on transitions for color and background-color.