Commit f7a9d37
authored
Only add
* Only add `!` to selector class matching template candidate
Fixes tailwindlabs#7226.
Before this PR, if you had a class like:
```css
.one .two {
background: black
}
```
...and then used `!one` in your template, the generated CSS would be this:
```css
.\!one .\!two {
background: black !important
}
```
This would cause the styles to not be applied unless you also added `!` to the beginning of other classes in the template that are part of this selector.
This PR makes sure that other classes in the selector aren't mistakenly prefixed with `!`, so that you can add `!` to only one of the classes in your template and get the expected result.
* Update CHANGELOG! to selector class matching template candidate (tailwindlabs#7664)1 parent bd16763 commit f7a9d37
File tree
3 files changed
+26
-3
lines changed- src/lib
- tests
3 files changed
+26
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
| |||
514 | 517 | | |
515 | 518 | | |
516 | 519 | | |
517 | | - | |
| 520 | + | |
518 | 521 | | |
519 | 522 | | |
520 | 523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
20 | 36 | | |
21 | 37 | | |
22 | 38 | | |
| |||
57 | 73 | | |
58 | 74 | | |
59 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
60 | 79 | | |
61 | 80 | | |
62 | 81 | | |
| |||
0 commit comments