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

Support Tailwind out of the box #1155

Merged
merged 11 commits into from
Jun 18, 2023
Merged

Support Tailwind out of the box #1155

merged 11 commits into from
Jun 18, 2023

Conversation

kbrgl
Copy link
Contributor

@kbrgl kbrgl commented Jun 7, 2023

Closes #141. This change adds Tailwind support to Pynecone out of the box by installing Tailwind in the default template and adding a tailwind key in the config. An empty dict simply enables Tailwind; the dict can be filled in to configure any Tailwind options except for content, which we set ourselves to avoid a leak in the abstraction (since we have to set it to a Next.js-specific path). Strings passed for plugins are automatically wrapped with require(...).

An example app has been added at reflex-dev/reflex-examples#112.

All Submissions:

  • Have you followed the guidelines stated in CONTRIBUTING.md file?
  • Have you checked to ensure there aren't any other open Pull Requests for the desired changes?

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

New Feature Submission:

  • Does your submission pass the tests?
  • Have you linted your code locally prior to submission?

@kbrgl kbrgl marked this pull request as ready for review June 16, 2023 10:15
@kbrgl kbrgl requested a review from picklelo June 16, 2023 10:16
@kbrgl kbrgl mentioned this pull request Jun 16, 2023
Copy link
Contributor

@picklelo picklelo left a comment

Choose a reason for hiding this comment

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

nice job getting this working

@@ -125,6 +125,22 @@ def _compile_components(components: Set[CustomComponent]) -> str:
)


def _compile_tailwind(
config: dict,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the type annotation needs to be Dict to support 3.7, we can fix in a follow up

@@ -239,6 +255,26 @@ def compile_components(components: Set[CustomComponent]):
return output_path, code


@write_output
def compile_tailwind(
config: dict,
Copy link
Contributor

Choose a reason for hiding this comment

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

here also

@picklelo picklelo merged commit 1de48ee into main Jun 18, 2023
@picklelo picklelo deleted the kabir/tailwind-ux branch June 23, 2023 21:09
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.

Tailwind support
2 participants