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

tailwind.config.js: disabling tailwind's preflight #3185

Closed
seewindcn opened this issue Apr 29, 2024 · 4 comments
Closed

tailwind.config.js: disabling tailwind's preflight #3185

seewindcn opened this issue Apr 29, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@seewindcn
Copy link
Contributor

Describe the bug
about tailwind preflight, it maybe conflict with other components, like ant-design.

To Reproduce
Steps to reproduce the behavior:

  • Code/Link to Repo:

Expected behavior
it can be disable by tailwind.config.js:

module.exports = {
  corePlugins: {
    preflight: false,
  }
}

Screenshots
If applicable, add screenshots to help explain your problem.
ant-design-button

Specifics (please complete the following information):

  • Python Version:
  • Reflex Version:
  • OS:
  • Browser (Optional):

Additional context
Add any other context about the problem here.

@picklelo
Copy link
Contributor

Do you want this disabled by default? For any specific app, you should be able to set this in your rxconfig.py:

import reflex as rx


config = rx.Config(
    app_name="pcweb",
    tailwind={
        "module.exports": {
             "corePlugins": {
                  "preflight": False,
             }
       }
   }
)

@seewindcn
Copy link
Contributor Author

yes, but your code doesn't work.
in reflex, web/tailwind.config.js.jinja2:

/** @type {import('tailwindcss').Config} */
module.exports = {
	content: {{content|json_dumps}},
	theme: {{theme|json_dumps}},
	plugins: [
	{% for plugin in plugins %}
		require({{plugin|json_dumps}}),
	{% endfor %}
	],
	{% if presets is defined %}
	presets: [
	{% for preset in presets %}
		require({{preset|json_dumps}})
	{% endfor %}
	],
	{% endif %}
	{% if darkMode is defined %}
	darkMode: {{darkMode|json_dumps}},
	{% endif %}
};

it do not handle the corePlugins.

@Alek99 Alek99 added the bug Something isn't working label May 2, 2024
@seewindcn
Copy link
Contributor Author

@Alek99 is there any schedule to fix? or could I pull request to fix it?

@masenf
Copy link
Collaborator

masenf commented May 9, 2024

@seewindcn no one on the team is currently working on this issue.

But if you submit a PR, we will review it and help get it merged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants