Load tailwind CSS classes when they are used within directives and page content #1617
Labels
enhancement
New feature or request
User Interface
Enhancements or bugs with the default theme user-interface.
There are some directives that can have CSS classes attached directly to them. For example:
We build the default MyST themes with TailwindCSS which means that we should be able to use the Tailwind CSS classes by attaching them to directives and page content like the above.
However, the relevant CSS classes are only loaded based on the HTML theme / config, and this means that classes defined purely in page content won't be detected and loaded.
Suggested enhancement
When building HTML assets, take a pass through the page content and see if any HTML classes have been added there. If they are, load the relevant classes from Tailwind at build time so that they work.
The text was updated successfully, but these errors were encountered: