Skip to content

Commit 1fdc7cd

Browse files
author
vitalets
committed
readme
1 parent 135667c commit 1fdc7cd

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export default {
108108
}
109109

110110
// app entry
111-
import theme from '.theme';
111+
import theme from './theme';
112112
EStyleSheet.build(theme);
113113
```
114114

@@ -133,6 +133,7 @@ const styles = EStyleSheet.create({
133133

134134
### Local variables
135135
Local variables can be defined directly in sylesheet and have priority over global variables.
136+
To define local variable just start it with `$`:
136137
```js
137138
const styles = EStyleSheet.create({
138139
$textColor: '#0275d8',
@@ -181,9 +182,8 @@ EStyleSheet.build({
181182
\[[top](#)\]
182183

183184
### Percents
184-
Percents are useful for **single-orientation apps** because calculation is performed on app start only.
185-
You can apply it to top-level components as percent values are calculated from **screen** width/height
186-
(not from parent component).
185+
Percent values are useful for **single-orientation apps** because calculation is performed on app start only.
186+
They are calculated relative to **screen width/height** (not parent component!).
187187
```js
188188
const styles = EStyleSheet.create({
189189
column: {
@@ -232,7 +232,6 @@ render() {
232232
Media queries are supported in standard format (thanks for idea to [@grabbou](https://github.com/grabbou),
233233
[#5](https://github.com/vitalets/react-native-extended-stylesheet/issues/5)).
234234
They allows to have different styles for different screens, platform, orienation etc.
235-
You can define media queries on sheet level or style level.
236235

237236
Supported values are:
238237

@@ -242,7 +241,7 @@ Supported values are:
242241
* `orientation` (`landscape|portrait`)
243242
* `aspect-ratio`
244243

245-
Example:
244+
You can define media queries on sheet level or style level:
246245
```js
247246
const styles = EStyleSheet.create({
248247
column: {

0 commit comments

Comments
 (0)