Textarea (wrong?), Inherited css white-space property from parent class

I have a text box inside the parent div. The parent div has white space: nowrap. Should textarea inherit white space: nowrap? In IE11, textarea inherits "nowrap". Chrome ignores the inherited “nowrap” and instead uses “white-space: pre-wrap” from the user agent stylesheet. I know that I can fix this by explicitly specifying the white space property of textarea. Should I explicitly set the text field spaces or is it an IE11 error?

The following JSFiddle demonstrates the problem. (Open it in IE11 and Chrome and note the difference).

http://jsfiddle.net/sTAB3/1/

Here is the code in the JSFiddle:

.a {
    white-space: nowrap;
}

<div class="a">
  <textarea id="log" rows="20" cols="50">If I may... Um, I'll tell you the problem with the scientific power that you're using here, it didn't require any discipline to attain it. You read what others had done and you took the next step. You didn't earn the knowledge for yourselves, so you don't take any responsibility for it. You stood on the shoulders of geniuses to accomplish something as fast as you could, and before you even knew what you had, you patented it, and packaged it, and slapped it on a plastic lunchbox, and now you're selling it</textarea>
</div>
+4
1

, IE 11, white-space textarea. .

white-space: pre-wrap textarea IE 11.

( ), , .

1

:

textarea IE11

enter image description here

2

Internet Explorer 11 , textarea IE 11. IE 10 FF, Safari Chrome , .

0

Source: https://habr.com/ru/post/1548135/


All Articles