- Issue created by @badg0003
- Status changed to Closed: works as designed
over 1 year ago 8:43am 11 September 2023 - 🇦🇹Austria hudri Austria
There are currenly no plans to implement this, beause it most likely will result in worse performance in most scenarios.
The choice to include the CSS inline in HTML doc was intentional, mostly because the critical CSS path (things visible on screen before scrolling down) should always be inline in the doc. Making the CSS external would most likely result in worse performance.
One major advantage of TailwindCSS is that it removes any unncecessary CSS. The major advantage of this module is that it delivers perfectly trimmed CSS per Drupal page. This also means that the external CSS file would is usually unique per page, and a performance gain from the re-usage of external CSS does not really exist. OTOH the delivered CSS also is usually quite small (it might look large to the human eye, but it is trimmed and repetitive, so zip compression will easily bring it down below the 14kB mentioned in the Google link above).
The real key to performance is that Drupal's "Internal Page Cache" module is active and can return a cached response, because then it also returns fully cached Tailwind CSS, and it simply does not need an external cached CSS.
OTOH registered users (incl. admin users) never hit the Internal Page Cache and always have to wait . I recommend to use this module only if you can reliably use the Interal Page Cache module == the overwhelming part of your audience is anonymous users.