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

Base Template without Tailwind Utility Classes #3743

Open
nikischin opened this issue Nov 26, 2024 · 2 comments
Open

Base Template without Tailwind Utility Classes #3743

nikischin opened this issue Nov 26, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@nikischin
Copy link
Contributor

Is your feature request related to a problem? Please describe.
With the current implementation with the tailwind utility classes attached to the elements, it is quite a challenge to override the default properties with custom styles. While the default styles are really nice already, I personally feel like it would be a better developer experience if there would be an easy way to edit the styles. While Tailwind is cool for individual implementations, it has limits, if used as a template.

Describe the solution you'd like
I would recommend adding custom nextra pre-fixed class names to all components and remove the tailwind classes. So each element should have only one instead of many CSS classes (in some case might also have more than only one but it should be generic classes and not utility classes)

Describe alternatives you've considered
The implementation could use the Tailwind CSS variables for the styling (to be discussed) so it would integrate well with current implementations with possible modifications.

Additional context
Would be a breaking Change. Possibly could be first integrated as a separate Theme, but should soon be merged to be the main theme again to reduce double maintenance efforts.

@nikischin nikischin added the enhancement New feature or request label Nov 26, 2024
@dimaMachina
Copy link
Collaborator

With the current implementation with the tailwind utility classes attached to the elements, it is quite a challenge to override the default properties with custom styles.

What's challenging? if it's issued with CSS selectors' priority use CSS layers https://nextra.site/docs/guide/advanced/customize-the-cascade-layers

While Tailwind is cool for individual implementations, it has limits, if used as a template.

nextra-theme-docs / blog are not a template but themes

So each element should have only one instead of many CSS classes (in some case might also have more than only one but it should be generic classes and not utility classes)

Sorry, but I am not interested in spending developer hours on these refactoring, you can always copy official themes and fully override them on your needs

@nikischin
Copy link
Contributor Author

Hey @dimaMachina, thank you so much for your answer!

That seems absolutely reasonable. I was wondering, if someone would do such a refactoring (replace Tailwind utility with nextra CSS selectors) would you accept it as a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants