-
Context: <button class="button button--primary p-2 rounded">
{{- 'component.button'|trans -}}
</button> The bundle, for the above example ships with two utilities: Problem: {% extends '@MyBundle/component/button.html.twig' %}
<button class="button button--primary p-2 rounded border">
{{- 'component.button'|trans -}}
</button> This causes Tailwind to generate Current solution: The /* eslint-disable */
module.exports = {
presets: [
require('@MyBundle/tailwind')
],
safelist: [
/* 50 utilities here... */
],
} The Prefered solution: Explored alternatives: Any help would be greatly appriciated! 👍 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I would recommend not using the bundle's compiled CSS at all if possible. Consider compiling all the CSS in your own project. This ensures no duplication and that all the rules are in the right order.
|
Beta Was this translation helpful? Give feedback.
I would recommend not using the bundle's compiled CSS at all if possible. Consider compiling all the CSS in your own project. This ensures no duplication and that all the rules are in the right order.
Even better if the bundle shares its ownAh, I see you're already doing this ^_^tailwind.config.js
that you could then load as a preset. This would then mean you can inherit any custom theme tokens in your project.