Commit c080688
authored
Simplify details for utility completions (#1356)
Fixes #1347
This PR addresses two problems (see screenshots below):
1. Utilities that generate `@property` rules will include the
declarations from `@property` in the completion details.
2. Custom variants that include declarations will include those
declarations in the completion details.
To fix these we are now:
1. Generating details using the "base" utility
2. Dropping any uses of `@property` before calculating the list of
declarations
**Before**
<img width="1197" alt="Screenshot 2025-05-09 at 18 08 57"
src="https://github.com/user-attachments/assets/59193060-7cc7-4d25-ae69-fd60be2899c6"
/>
<img width="1078" alt="Screenshot 2025-05-09 at 18 10 12"
src="https://github.com/user-attachments/assets/b1e97530-cfd0-44db-9bb1-5b7392eacdc6"
/>
**After**
<img width="1031" alt="Screenshot 2025-05-09 at 18 11 36"
src="https://github.com/user-attachments/assets/96405f6e-9e5c-4c6e-a123-b0a42d088521"
/>
<img width="1174" alt="Screenshot 2025-05-09 at 18 12 46"
src="https://github.com/user-attachments/assets/d4a8a9c0-4735-4976-a57a-32f720edfb36"
/>
Note that the "documentation" portion of completion items is unchanged
and shows the full candidate with all the CSS included (for non-color
utilities):
<img width="1075" alt="Screenshot 2025-05-09 at 18 14 53"
src="https://github.com/user-attachments/assets/5e67090d-faea-4de1-9eab-8ee9709b123e"
/>1 parent e2cfc2c commit c080688
File tree
2 files changed
+22
-7
lines changed- packages
- tailwindcss-language-service/src
- vscode-tailwindcss
2 files changed
+22
-7
lines changedLines changed: 20 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2280 | 2280 | | |
2281 | 2281 | | |
2282 | 2282 | | |
| 2283 | + | |
| 2284 | + | |
2283 | 2285 | | |
| 2286 | + | |
2284 | 2287 | | |
2285 | 2288 | | |
2286 | 2289 | | |
2287 | 2290 | | |
2288 | 2291 | | |
2289 | 2292 | | |
2290 | 2293 | | |
2291 | | - | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
2292 | 2310 | | |
2293 | 2311 | | |
2294 | 2312 | | |
2295 | | - | |
2296 | | - | |
2297 | | - | |
2298 | | - | |
2299 | | - | |
2300 | | - | |
| 2313 | + | |
2301 | 2314 | | |
2302 | 2315 | | |
2303 | 2316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
0 commit comments