Commit 5501237
committed
Use class selector instead of element selectors
As far as I can tell `css-modules` locally scope class selectors but not
element selectors in from the component css file. This means that the
`GlobalSelectors` example is slightly misleading since:
```
.root :global p {
...
}
```
and
```
.root p {
...
}
```
Both have the desired result of styling all the `p` tags inside the
elements with the `.root` class applied.
Updating the example to use a, semantically meaningless, class makes
things clearer for people going through the examples.1 parent 11be9b8 commit 5501237
File tree
2 files changed
+2
-2
lines changed- src/components/2-GlobalSelectors
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
0 commit comments