-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add modifiers to context.getClassList
result
#10251
Conversation
conext.getClassList
resultcontext.getClassList
result
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
One thing I wonder though: will this be a breaking change for people using an older version of the intellisense plugin but using a newer version of Tailwind? If so, should we add a flag to the function instead? 🤔 |
It would break in that case, yeah. Do you mean something like |
What do you think of this now @RobinMalfait? |
Yep I think that would work! But I'm still trying to figure out how it would work from the plugins perspective and if we won anything with this The scenario's are:
Is that correct? |
Yeah that sounds right. For the second scenario what the extension currently does is roughly [
['uppercase'],
['text-2xl', { modifiers: [/* ... */] }],
// ...
] Then for the "check" you could do something like |
@bradlc Going to respond here so that it is a bit more public. Always using an array is an option, but you still have to check whether or not the options and I personally don't mind the mix between strings and arrays, because I see it like strings and tuples where if you want to configure options then you can switch to a tuple. I think the important part here is that we choose something that is the easiest for you to use without running into (too many) breaking changes. |
This PR adds modifier information to the
context.getClassList
result. This will allow IntelliSense to provide completions for modifiers such as those for line-height.Example result: