-
-
Notifications
You must be signed in to change notification settings - Fork 9
Description
When building an app, I successfully setup the tailwind standalong package, but it seems like some of the tailwind css classes are missing in the output.css such as: "text-4xl", "animate-spin", "animate-bounce". I don't have an exhaustive list, but those are just a few.
Steps to reproduce.
installations and setup:
pip install python-fasthtml
pip install shad4fast
shad4fast setup
shad4fast build
python main.py
the main.py is defined below. When running it, toggle the "hdrs=" line and you'll see the difference — using the CDN produces the correct screen, and using the standalone package does not. (screenshots below)
I expect that the CDN and the Standalone Package setup methods have identical output.css, assuming I execute the steps above and no others.
from fasthtml.common import *
from shad4fast import *
app, rt = fast_app(
pico=False,
# hdrs=(ShadHead(tw_cdn=True, theme_handle=True),), # this one has all classes
hdrs=(ShadHead(tw_cdn=False, theme_handle=True),), #this one does not
)
@rt("/")
def get():
return Div(
Div(
Div(
H1(
"Here is a title",
cls="text-4xl tracking-tighter font-semibold mt-10 text-center animate-pulse",
),
P("Here is a paragraph",
cls="text-muted-foreground"
),
cls="space-y-3"
),
cls="w-full space-y-6 text-center"
),
cls="flex items-center min-h-screen px-4 py-12 sm:px-6 md:px-8 lg:px-12 xl:px-16"
)
serve()
When using the Standalone Package:

When using the CDN:

Am I setting tailwind up incorrectly or something? I made no edits to any of the tailwind files. I just ran the commands above in that order and got these results.
Thank you! The package is awesome by the way!