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

Is there a way to define a prefix? #55

Closed
stefl opened this issue Oct 9, 2018 · 3 comments · Fixed by #60
Closed

Is there a way to define a prefix? #55

stefl opened this issue Oct 9, 2018 · 3 comments · Fixed by #60

Comments

@stefl
Copy link
Contributor

stefl commented Oct 9, 2018

Hi Ed,

I'm trying to using this project for a prototype that I'm building.

Part of that prototype has Bootstrap components, and there are a few clashes with Tailwind classes.

Tailwind supports a prefix option in config which prefixes all generated classes to avoid that problem.

Is there a way to define a prefix for this library so that I can take advantage of that feature?

Stef

@stefl
Copy link
Contributor Author

stefl commented Oct 9, 2018

Here's the link to the docs on the prefix feature: https://tailwindcss.com/docs/configuration/#prefix

@emortlock
Copy link
Owner

Not currently, but it's a good point - should hopefully be able to do it by making Base aware of the theme object and have it as a param in there which can be passed to getTailwindClassNames. Will give it a bash when I'm able (would obviously be happy to accept a PR too if you fancy it)

@emortlock
Copy link
Owner

Hey Stef, in v0.8.0+ you should now be able to define prefix: 'tw-' as part of the theme config & have that propagate through to all util classes

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 a pull request may close this issue.

2 participants