Bug 64655 - CSS Transitions and Transforms do not work with ::selection
Summary: CSS Transitions and Transforms do not work with ::selection
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-16 14:39 PDT by BrianMB
Modified: 2011-07-17 13:04 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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:
http://jsfiddle.net/brianblakely/EN6MH/
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.
https://bugs.webkit.org/show_bug.cgi?id=64670