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
.container utility is not working when used with breakpoints #7
Comments
Figured out what was wrong. The @media (min-width: 640px) {
.container {
max-width: 640px;
}
} In particular is uses the breakpoint pixel size inside of the declaration. Since we don't generate the breakpoint based utilities, if you use the Breakpoint utility Two solutions come to mind:
container : Maybe Breakpoint -> Css.Style Where if you pass in a breakpoint, it applies it, otherwise you get the default container I like the explicit behavior or this, but it may not be super obvious that you can't use the utility as you would expect, you need to know to use some extra helper: div [ css [TW.Breakpoints.container (Just lg) ] ]
[ div [ css [ TW.space_y_32 ] ]
[ div [ ] [ text "div" ] ]
] |
From Discourse thread:
Maybe its the breakpoint bit - but the effect was null using the package when the same combination of classes behave very nicely using ‘raw’ tailwindcss. The other issue was that I couldn’t put classes on svg - an elm-css thing since they have to be converted to styled html before elm-css can work with them.
The text was updated successfully, but these errors were encountered: