mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-24 03:35:43 +00:00
[docs] Change 'cascade' wording to 'inheritance'.
This commit is contained in:
@@ -395,7 +395,7 @@ originY | 0 | Transform originY coordinates for the current obj
|
||||
</Svg>
|
||||
```
|
||||
|
||||
You can cascade colors from the Svg element to its children:
|
||||
Colors set in the Svg element are inherited by its children:
|
||||
|
||||
```html
|
||||
<Svg
|
||||
@@ -418,9 +418,9 @@ You can cascade colors from the Svg element to its children:
|
||||
|
||||
Code explanation:
|
||||
|
||||
* fill prop defines the color inside the object.
|
||||
* stroke prop defines the color of the line drawn around the object.
|
||||
* color is a bit special in the sense that it won't color anything by itself, but define a kind of color variable that can be reused by children elements. In this example we're defining a "green" color in the Svg element and using it in the second Path element via stroke="currentColor". The "currentColor" is what refers to that "green" value, and it can be used by other props that accept colors too, e.g. fill="currentColor".
|
||||
* The fill prop defines the color inside the object.
|
||||
* The stroke prop defines the color of the line drawn around the object.
|
||||
* The color prop is a bit special in the sense that it won't color anything by itself, but define a kind of color variable that can be used by children elements. In this example we're defining a "green" color in the Svg element and using it in the second Path element via stroke="currentColor". The "currentColor" is what refers to that "green" value, and it can be used in other props that accept colors too, e.g. fill="currentColor".
|
||||
|
||||
### Rect
|
||||
|
||||
|
||||
Reference in New Issue
Block a user