Skip to content

Conversation

@bradlc
Copy link
Contributor

@bradlc bradlc commented Oct 1, 2021

  • Rename context.completions to context.getClassList – I think this better (1) indicates that it's a function, and (2) describes what the function returns
  • Remove colour information from the returned list. While the colour information is useful to an extent, it is complicated to use this information to resolve the colour for classes like hover:bg-red-500 or focus:bg-red-500/30. I have found it simpler to resolve the CSS for a class (using generateRules) and extract the colour from there.

@bradlc bradlc requested a review from RobinMalfait October 1, 2021 07:15
Copy link
Member

@RobinMalfait RobinMalfait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing unused code is always fun! Looking good!

@bradlc bradlc merged commit ba9d177 into master Oct 1, 2021
@bradlc bradlc deleted the get-class-list branch October 1, 2021 08:41
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.

3 participants