remove more peculiar web language

Summary:
I guess we could ask Håkon Wium Lie if indeed it was unintended to have a set of rules be inherited or not, but this paragraph is a little bit weird 🤷‍♀️
Closes https://github.com/facebook/react-native/pull/12485

Differential Revision: D4608425

Pulled By: hramos

fbshipit-source-id: a346b1e65c9fc7b06634e529c1ef6f9e24794cca
This commit is contained in:
Ryan Florence 2017-02-23 16:28:24 -08:00 committed by Facebook Github Bot
parent 7aa9f21dac
commit c6d56d944c
1 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ The `<Text>` element is special relative to layout: everything inside is no long
## Limited Style Inheritance
On the web, the usual way to set a font family and size for the entire document is to write:
On the web, the usual way to set a font family and size for the entire document is to take advantage of inherited CSS properties like so:
```css
/* CSS, *not* React Native */
@ -94,7 +94,7 @@ html {
}
```
When the browser is trying to render a text node, it's going to go all the way up to the root element of the tree and find an element with a `font-size` attribute. An unexpected property of this system is that **any** node can have `font-size` attribute, including a `<div>`. This was designed for convenience, even though not really semantically correct.
All elements in the document will inherit this font unless they or one of their parents specifies a new rule.
In React Native, we are more strict about it: **you must wrap all the text nodes inside of a `<Text>` component**; you cannot have a text node directly under a `<View>`.