Skip to content

Conversation

@thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Feb 7, 2025

All utilities implicitly have at least modifiers: [] in the class list when no modifiers are present. We should only change the completion list when there are actually modifiers to show in case an existing utility with a slash in it (e.g. w-1/2) is “close” to what the user has typed.

This is the other half to fix #1178 b/c while the completions show up but as soon as you type / they disappear which is an awful experience.

All utilities implicitly have at least `modifiers: []` in the class list when no modifiers are present. We should only change the completion list when there are actually modifiers to show in case an existing utility with a slash in it (e.g. `w-1/2`) is “close” to what the user has typed.
@thecrypticace thecrypticace marked this pull request as ready for review February 7, 2025 20:49
@thecrypticace thecrypticace merged commit ae2c6d9 into main Feb 10, 2025
@thecrypticace thecrypticace deleted the fix/handle-slash-suggestions branch February 10, 2025 19:08
thecrypticace added a commit to tailwindlabs/tailwindcss that referenced this pull request Feb 11, 2025
Fixes
tailwindlabs/tailwindcss-intellisense#1178
(partially)

An IntelliSense PR (+ Play update) is required to make this work better
with v4:
tailwindlabs/tailwindcss-intellisense#1182

<img width="671" alt="Screenshot 2025-02-07 at 15 19 59"
src="https://github.com/user-attachments/assets/7642b80c-f431-4a1e-964d-2a98ffe7a67a"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v4 - broken 1/2 completions

2 participants