Re: [css4-ui] Styling the caret

On Sat, Aug 16, 2014 at 9:16 AM, Edward O'Connor <eoconnor@apple.com> wrote:

> But what if they want to set the caret color to be the same as the
> foreground color of the editable area, whatever that may be? You might
> think that they can use the 'auto' keyword:
>
> [contenteditable] {
>   background: white;
>   color: black;
>   caret: auto;
> }
>
> But consider this case (where the | represents the caret):
>
> <div contenteditable>
> …<p style=color:red>this paragraph | is red</p>…
> </div>
>
> If the RTE developer uses the 'auto' keyword, the caret will be red,
> when they intended it to be black. (The p inherits caret: auto, and auto
> means currentColor, so it's the p's currentColor, not the div's.)
>

Can you describe a more concrete use-case where this matters?

I can't think of a reason why an author would want to lock the caret color
to the text color of a container element, without knowing what the text
color is, and knowing that there could be multi-colored content in the
container.

Rob
-- 
oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
owohooo
osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
oioso
oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
owohooo
osoaoyoso,o o‘oYooouo ofooooolo!o’o owoiololo oboeo oiono odoaonogoeoro
ooofo
otohoeo ofoioroeo ooofo ohoeololo.

Received on Thursday, 4 September 2014 23:16:44 UTC