Skip to content
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 Tailwind Merge to base component for automatic class merging #67

Merged
merged 4 commits into from
Jul 28, 2024

Conversation

SethHorsley
Copy link
Collaborator

Overview

Integrated Tailwind Merge into the base component class, enabling automatic merging of Tailwind CSS classes for all components, both in their implementation and usage.

Details

  • Added to base component class, affecting all inheriting components
  • Applies to internal component classes and classes added during component use
  • Automatically merges and de-duplicates Tailwind classes

Benefits

  • Reduces CSS conflicts and redundancy
  • Simplifies component development and usage
  • Improves overall CSS efficiency

Related: Tailwind Merge

@SethHorsley SethHorsley requested a review from cirdes July 23, 2024 14:54
phlex_ui.gemspec Outdated
s.add_dependency "rouge", "~> 4.2.0"
s.add_dependency "zeitwerk", "~> 2.6"
s.add_dependency "activesupport", ">= 6.0"
s.add_dependency "tailwind_merge", "0.12.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

@iseth , I don't think we should be so restrictive and lock onto a specific version.

Take avo for example; they are taking an even more optimistic approach and using >= instead of ~> for their dependencies. I believe we should do the same here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point. Thanks

@SethHorsley SethHorsley requested a review from cirdes July 27, 2024 13:29
Copy link
Collaborator

@cirdes cirdes left a comment

Choose a reason for hiding this comment

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

Very excited about this PR. Just run the bundler to fix the CI and we're good to go!

Copy link
Collaborator Author

@SethHorsley SethHorsley left a comment

Choose a reason for hiding this comment

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

Double checked and looks good.

@SethHorsley SethHorsley merged commit d210ae0 into main Jul 28, 2024
4 checks passed
@SethHorsley SethHorsley deleted the add-tailwind-merge branch July 28, 2024 20:11
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.

2 participants