Google Chrome 58.0.3029.110 (x64), Firefox 53.0.2 (x64), Linux
Why is the first letter of the textarea
element not appearing in red?
The CSS selector textarea::first-line
seems to work fine in Google Chrome, but it doesn't in Firefox. However, the textarea::first-letter
does not work properly in my example. I am experiencing a similar issue with an input
element as well.
I do not encounter any problems when using the p
tag instead of textarea
or input
.
input::first-line,
textarea::first-line {
color: green;
}
input::first-letter,
textarea::first-letter {
color: red;
}
<textarea cols='40' rows='4'>Sfrrr sdfsdfsd dsf ddsfds fds fdsfds fsdfds fsdfdsf sd fdss d dsf ssdfddfsddsfdssdsf ss dfsds sdf sdf sdfs fsf sf sdfsdfsdfs df sdffsdf sf sdf sdf sf sf sdf sdf sdf sdf sf sdf sdf sf sdf sdf sdf sfsdfsdf sdf sdf sdfs sdf sdfds dsf sdf sdf sdfsdf sdf dsfs</textarea>
<input value='Sfrrr sdfsdfsd dsf ddsfds fds fdsfds fsdfds' />