Closed goaround closed 4 years ago
Documentation is outdated there - my bad 🤦♂️
If you're using the latest starter, it's configured to use :
as a separator in Tailwind. So sm-inline-block
is purged, while sm:inline-block
isn't. You can either change the separator to -
or switch to writing Tailwind classes with the cool :
separator :)
It's working in {% block template %}
because that doesn't go through PurgeCSS (but it could, if you write the style tag as <style tailwind>
- see docs). Also, it's working with maizzle serve
(or maizzle build
) because PurgeCSS is not used in development.
Thanks for bringing this up, I'll go through all docs today and update any examples 👍
🙈 I tried everythink except changing the seperator. Thank you!
Description:
I've tried to use the https://maizzle.com/docs/reverse-stack/#reverse-2-col but when I run
maizzle build staging
ormaizzle build production
thesm-inline-block w-1-2
classes get striped away.It seems like that PurgeCSS can't find the classes inside the template and because its not inside the css, the classes get strieped away. I think there is a bug inside the PurgeCSS extractor.
It works fine during
maizzle serve
but not in staging/production.Steps To Reproduce:
maizzle new my-project
{% block template %} ... {% endblock %}
insrc/templates/newsletter.njk
with the example:maizzle build staging
and check the build_staging/newsletter.html It should look like this:With only
<td class="sm-w-full" style="padding-left: 8px; padding-right: 8px;">
Strangely enough if I just add the example right after
{% block template %}
and leave the newsletter example below, the classes get not purged and it works fine...