Commit 0f6f7d4
authored
While working on #19989, I noticed that `--value(…)` inside functional
`@utility` definitions is not required right now.
That means that the following CSS is valid:
```css
@Utility foo-* {
color: red;
}
```
But this doesn't really makes sense, because this now accepts a value
and `foo-a`, `foo-b` and `foo-c` would generate the following CSS:
```css
.foo-a {
color: red;
}
.foo-b {
color: red;
}
.foo-c {
color: red;
}
```
The `a`, `b`, and `c` are not doing anything here apart from making your
CSS bigger. So this is very likely an actual bug that you forgot to use
`--value(…)`.
Additionally, if a `--value(…)` was used, but it didn't resolve
anything, then we already properly discared the candidate.
## Test plan
1. Add test to ensure `--value(…)` is required in functional `@utility`
definitions
2. Existing tests pass
1 parent 6e2b60e commit 0f6f7d4
3 files changed
Lines changed: 44 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28870 | 28870 | | |
28871 | 28871 | | |
28872 | 28872 | | |
| 28873 | + | |
| 28874 | + | |
| 28875 | + | |
| 28876 | + | |
| 28877 | + | |
| 28878 | + | |
| 28879 | + | |
| 28880 | + | |
| 28881 | + | |
| 28882 | + | |
| 28883 | + | |
| 28884 | + | |
| 28885 | + | |
| 28886 | + | |
| 28887 | + | |
| 28888 | + | |
| 28889 | + | |
| 28890 | + | |
| 28891 | + | |
| 28892 | + | |
| 28893 | + | |
| 28894 | + | |
| 28895 | + | |
| 28896 | + | |
| 28897 | + | |
| 28898 | + | |
| 28899 | + | |
| 28900 | + | |
| 28901 | + | |
| 28902 | + | |
| 28903 | + | |
| 28904 | + | |
| 28905 | + | |
| 28906 | + | |
28873 | 28907 | | |
28874 | 28908 | | |
28875 | 28909 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6178 | 6178 | | |
6179 | 6179 | | |
6180 | 6180 | | |
6181 | | - | |
6182 | | - | |
| 6181 | + | |
| 6182 | + | |
6183 | 6183 | | |
6184 | 6184 | | |
6185 | | - | |
| 6185 | + | |
6186 | 6186 | | |
6187 | 6187 | | |
6188 | | - | |
| 6188 | + | |
6189 | 6189 | | |
6190 | 6190 | | |
6191 | 6191 | | |
| |||
6203 | 6203 | | |
6204 | 6204 | | |
6205 | 6205 | | |
6206 | | - | |
| 6206 | + | |
6207 | 6207 | | |
6208 | 6208 | | |
6209 | 6209 | | |
| |||
6213 | 6213 | | |
6214 | 6214 | | |
6215 | 6215 | | |
6216 | | - | |
| 6216 | + | |
6217 | 6217 | | |
6218 | 6218 | | |
6219 | 6219 | | |
| |||
6233 | 6233 | | |
6234 | 6234 | | |
6235 | 6235 | | |
6236 | | - | |
6237 | | - | |
| 6236 | + | |
| 6237 | + | |
| 6238 | + | |
6238 | 6239 | | |
6239 | 6240 | | |
6240 | 6241 | | |
| |||
0 commit comments