Skip to content

Commit 9e41e96

Browse files
committed
Update example with new CSS var spec & default rework-vars behavior
1 parent 048826a commit 9e41e96

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,22 @@ is left as is, to fallback to the CSS3 Calc feature.
3434

3535
```css
3636
:root {
37-
var-main-font-size: 16px;
37+
--main-font-size: 16px;
3838
}
3939

4040
body {
41-
font-size: var(main-font-size);
41+
font-size: var(--main-font-size);
4242
}
4343

4444
h1 {
45-
font-size: calc(var(main-font-size) * 2);
45+
font-size: calc(var(--main-font-size) * 2);
4646
height: calc(100px - 2em);
4747
}
4848
```
4949

5050
**yields**:
5151

5252
```css
53-
:root {
54-
var-main-font-size: 16px
55-
}
56-
5753
body {
5854
font-size: 16px
5955
}

0 commit comments

Comments
 (0)