- From: Florian Rivoal <florian@rivoal.net>
- Date: Fri, 10 Apr 2015 17:47:31 +0200
- To: www-style list <www-style@w3.org>
- Cc: Tantek Çelik <tantek@cs.stanford.edu>
I hadn't noticed earlier, but the definition of caret-color as currently in the spec has 2 issues. 1) The computed value of auto is currentColor That makes the auto value identical to currentColor, and not useful. I believe we should follow the example of auto in outline-style, and to leave UAs free to be innovative about what what it does, and offering a suggestion of a basic behavior (same as currentColor being reasonable here) if they have no particularly useful idea. Proposed phrasing: The computed value for auto is auto. The auto value permits the user agent to automatically adjust the color of caret to ensure good visibility and contrast with the surrounding content, possibly based on the text color, background, shadows, etc. User agents may treat auto as currentColor. 2) The property is marked is not inherited It should be inherited, similarly to the 'color' property, and to respect the principle based on which just adding a span in the middle of an inline shouldn't change anything. The caret when placed in "ipsum" in the two examples below needs to have the same color (orange). <div style="caret-color:orange" contenteditable>Lorem ipsum dolor</div> <div style="caret-color:orange" contenteditable>Lorem <span>ipsum</span> dolor</div> Both Bloomberg's implementation in chromium[1] and Daniel's implementation for Gecko[2] treat it as inherited. - Florian [1] https://github.com/bloomberg/chromium.bb/commit/4a0f4d723a14c0634734da94eef383884488b99f [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1063162#c12
Received on Friday, 10 April 2015 15:47:55 UTC