# \#tailwind

**URL:** https://discourse.gohugo.io/tag/tailwind/2.md

[Latest](https://discourse.gohugo.io/latest.md) · [Categories](https://discourse.gohugo.io/categories.md) · [Tags](https://discourse.gohugo.io/tags.md)

---

## [Hugo\_stats.json does not work when added to .gitignore](https://discourse.gohugo.io/t/hugo-stats-json-does-not-work-when-added-to-gitignore/56956)

<div class="topic-metadata">

**Author:** [@istiak\_ahammad2001](https://discourse.gohugo.io/u/istiak_ahammad2001)\
**Replies:** 1\
**Last updated:** [April 2, 2026, 9:55am UTC](https://discourse.gohugo.io/t/hugo-stats-json-does-not-work-when-added-to-gitignore/56956 "2026-04-02T09:55:16Z")

</div>

I’m facing an issue with my hugo\_stats.json file. When I add this file to my .gitignore, it stops working. However, if I remove it from .gitignore, everything works correctly. I’ve tried several ways to fix this, but no…

---

## [Custom hex colors specified in YAML data aren't rendering in the AgencyWeb Theme's hero partial unless the template's CSS file is copied to the project](https://discourse.gohugo.io/t/custom-hex-colors-specified-in-yaml-data-arent-rendering-in-the-agencyweb-themes-hero-partial-unless-the-templates-css-file-is-copied-to-the-project/56783)

<div class="topic-metadata">

**Author:** [@HugoPathfinder](https://discourse.gohugo.io/u/HugoPathfinder)\
**Replies:** 1\
**Last updated:** [March 1, 2026, 8:30pm UTC](https://discourse.gohugo.io/t/custom-hex-colors-specified-in-yaml-data-arent-rendering-in-the-agencyweb-themes-hero-partial-unless-the-templates-css-file-is-copied-to-the-project/56783 "2026-03-01T20:30:36Z")

</div>

I’m using the AgencyWeb Theme and have encountered an issue with custom colors not rendering properly. In home.html, I’m using the hero partial and providing content via data/home.yml. I can specify colors in hex format…

---

## [Tailwind parcel watcher issue](https://discourse.gohugo.io/t/tailwind-parcel-watcher-issue/56733)

<div class="topic-metadata">

**Author:** [@DirkC](https://discourse.gohugo.io/u/DirkC)\
**Replies:** 3\
**Last updated:** [February 19, 2026, 10:17am UTC](https://discourse.gohugo.io/t/tailwind-parcel-watcher-issue/56733 "2026-02-19T10:17:52Z")

</div>

I’m trying to use Tailwind with Theme Pehtheme Hugo (only the theme) - GitHub - dceuppens/tailwindtrial: Hugo Tailwindtrial I can use the theme without issues. When I want implement the steps mentioned in the doc css.Ta…

---

## [Using another .css file to modify React Components](https://discourse.gohugo.io/t/using-another-css-file-to-modify-react-components/56592)

<div class="topic-metadata">

**Author:** [@Paul\_NOWAK](https://discourse.gohugo.io/u/Paul_NOWAK)\
**Replies:** 1\
**Last updated:** [January 20, 2026, 12:15pm UTC](https://discourse.gohugo.io/t/using-another-css-file-to-modify-react-components/56592 "2026-01-20T12:15:21Z")

</div>

Hello, I’m working on the reation of a static site for a professionnel work. I’m building a Hugo site using the Blowfish theme and integrating some React components. Furthermore, I’m using a single custom.css file to up…

---

## [Odd issue, wanted to confirm fix - CSS class not detected](https://discourse.gohugo.io/t/odd-issue-wanted-to-confirm-fix-css-class-not-detected/56568)

<div class="topic-metadata">

**Author:** [@zefoo](https://discourse.gohugo.io/u/zefoo)\
**Replies:** 1\
**Last updated:** [January 14, 2026, 9:31pm UTC](https://discourse.gohugo.io/t/odd-issue-wanted-to-confirm-fix-css-class-not-detected/56568 "2026-01-14T21:31:57Z")

</div>

Hi all, new to Hugo. Spent dozens of hours in it this past week. I’m in love. :slight\_smile: One thing I’m noticing: I added the CSS class md:space-y-32 to a template. Hugo rebuilds in docker. But the CSS class doesn’t …

---

## [Tailwind v4 isn't purging CSS](https://discourse.gohugo.io/t/tailwind-v4-isnt-purging-css/56305)

<div class="topic-metadata">

**Author:** [@BobRock](https://discourse.gohugo.io/u/BobRock)\
**Replies:** 1\
**Last updated:** [November 30, 2025, 6:11pm UTC](https://discourse.gohugo.io/t/tailwind-v4-isnt-purging-css/56305 "2025-11-30T18:11:29Z")

</div>

I’ve set up Tailwind v4 per the Hugo docs, and it’s working to create the necessary CSS. But it doesn’t seem to be purging unused CSS. At least I don’t think so because I see a lot of CSS generated and many, many rules t…

---

## [Issue with css.TailwindCSS](https://discourse.gohugo.io/t/issue-with-css-tailwindcss/56113)

<div class="topic-metadata">

**Author:** [@MikeWitt](https://discourse.gohugo.io/u/MikeWitt)\
**Replies:** 3\
**Last updated:** [October 19, 2025, 6:33pm UTC](https://discourse.gohugo.io/t/issue-with-css-tailwindcss/56113 "2025-10-19T18:33:17Z")

</div>

I’m just getting started with Hugo, and I’m in the process of trying to get CSS styling setup using Tailwind. I think I’ve encountered a hugo bug that’s specific to Windows, but ultimately I don’t know what the issue is. …

---

## [TailwindCSS 4.x - not generating classes from hugo\_stats.json file](https://discourse.gohugo.io/t/tailwindcss-4-x-not-generating-classes-from-hugo-stats-json-file/55899)

<div class="topic-metadata">

**Author:** [@daviddehoog](https://discourse.gohugo.io/u/daviddehoog)\
**Replies:** 1\
**Last updated:** [September 12, 2025, 9:15am UTC](https://discourse.gohugo.io/t/tailwindcss-4-x-not-generating-classes-from-hugo-stats-json-file/55899 "2025-09-12T09:15:04Z")

</div>

Hi there I’ve installed Hugo (hugo v0.148.2+extended+withdeploy), tailwind (v4.0.8) using npm, installed a theme (hugo-discaptive) and configured my site to use the theme, in a branch of my repo. If I build the site and…

---

## [Unable to Load Theme Correctly, CSS Styles Not Applied](https://discourse.gohugo.io/t/unable-to-load-theme-correctly-css-styles-not-applied/54915)

<div class="topic-metadata">

**Author:** [@phbst](https://discourse.gohugo.io/u/phbst)\
**Replies:** 3\
**Last updated:** [May 30, 2025, 4:10am UTC](https://discourse.gohugo.io/t/unable-to-load-theme-correctly-css-styles-not-applied/54915 "2025-05-30T04:10:12Z")

</div>

I’m not a very professional user, and this issue might have been mentioned by others before, but I haven’t been able to resolve it myself. Issue Description I’m trying to integrate a theme as a Git submodule in my Hugo …

---

## [Utilities layer in theme](https://discourse.gohugo.io/t/utilities-layer-in-theme/54761)

<div class="topic-metadata">

**Author:** [@bitNomad](https://discourse.gohugo.io/u/bitNomad)\
**Replies:** 3\
**Last updated:** [May 17, 2025, 10:52pm UTC](https://discourse.gohugo.io/t/utilities-layer-in-theme/54761 "2025-05-17T22:52:23Z")

</div>

I am trying to use a tailwind library within my own theme. If I build the css from the root of the project it works fine, but when buried beneath themes/\[theme-name\] it comes up short by ~1200 lines. I have used both po…

---

## [Calling site parameters in a partial to build Tailwind CSS](https://discourse.gohugo.io/t/calling-site-parameters-in-a-partial-to-build-tailwind-css/54765)

<div class="topic-metadata">

**Author:** [@mattstratton](https://discourse.gohugo.io/u/mattstratton)\
**Replies:** 2\
**Last updated:** [May 17, 2025, 11:36am UTC](https://discourse.gohugo.io/t/calling-site-parameters-in-a-partial-to-build-tailwind-css/54765 "2025-05-17T11:36:01Z")

</div>

I’m attempting to use the example css.html partial from the css.Tailwindcss documentation (as below) (this is my modified version): {{ with (templates.Defer (dict "key" "global")) }} {{ $theme := $.Site.Params.colorS…

---

## [Tailwind CSS: error importing CSS files into layers](https://discourse.gohugo.io/t/tailwind-css-error-importing-css-files-into-layers/54483)

<div class="topic-metadata">

**Author:** [@jswtch](https://discourse.gohugo.io/u/jswtch)\
**Replies:** 2\
**Last updated:** [April 23, 2025, 6:37pm UTC](https://discourse.gohugo.io/t/tailwind-css-error-importing-css-files-into-layers/54483 "2025-04-23T18:37:22Z")

</div>

Hello, I can not import CSS files into layers. @import "tailwindcss"; @source "hugo\_stats.json"; @layer theme, layout, ui, test; @import "test.css" layer(test); @import "theme.css" layer(theme); ... Fails with \` TAIL…

---

## [Tailwind / theme lookup tables for color values?](https://discourse.gohugo.io/t/tailwind-theme-lookup-tables-for-color-values/54034)

<div class="topic-metadata">

**Author:** [@Wolfspyre](https://discourse.gohugo.io/u/Wolfspyre)\
**Replies:** 1\
**Last updated:** [March 21, 2025, 9:09am UTC](https://discourse.gohugo.io/t/tailwind-theme-lookup-tables-for-color-values/54034 "2025-03-21T09:09:00Z")

</div>

a somewhat useful feature that doesn’t exist, but given the integration level, I believe it would be within the scope of wot exists now to do…. I created a janky as hell partial which, in conjunction with some handmade …

---

## [Some resources for TailwindCss v4](https://discourse.gohugo.io/t/some-resources-for-tailwindcss-v4/53334)

<div class="topic-metadata">

**Author:** [@baker](https://discourse.gohugo.io/u/baker)\
**Replies:** 13\
**Last updated:** [February 23, 2025, 8:42pm UTC](https://discourse.gohugo.io/t/some-resources-for-tailwindcss-v4/53334 "2025-02-23T20:42:54Z")

</div>

I am in no hurry to use Tailwind V4 but look around anyway. Here are some links that can give some inspiration… Those are not guides, just for getting some ideas how people do it: PS: I am not related to any of t…

---

## [Tailwindcss 4 and HUGO build error](https://discourse.gohugo.io/t/tailwindcss-4-and-hugo-build-error/53625)

<div class="topic-metadata">

**Author:** [@alf9897](https://discourse.gohugo.io/u/alf9897)\
**Replies:** 15\
**Last updated:** [February 22, 2025, 10:03am UTC](https://discourse.gohugo.io/t/tailwindcss-4-and-hugo-build-error/53625 "2025-02-22T10:03:16Z")

</div>

Hello I’m trying to install this theme Hugoplate. I got this error Built in 919 ms Error: error building site: TAILWINDCSS: failed to transform "/css/main.css" (text/css): (node:13942) Warning: To load an ES modul…

---

## [Tailwind setup](https://discourse.gohugo.io/t/tailwind-setup/44039)

<div class="topic-metadata">

**Author:** [@rbole](https://discourse.gohugo.io/u/rbole)\
**Replies:** 6\
**Last updated:** [February 12, 2025, 3:12am UTC](https://discourse.gohugo.io/t/tailwind-setup/44039 "2025-02-12T03:12:23Z")

</div>

Hi I have a question regarding the tailwind setup. I have followed some guide to setup tailwind with hugo pipes and this is working. But I have recognized that new utility classes I would like to use in the project are …

---

## [How to configure Hugo to use the TailwindCSS v4 binary instead of npm?](https://discourse.gohugo.io/t/how-to-configure-hugo-to-use-the-tailwindcss-v4-binary-instead-of-npm/53018)

<div class="topic-metadata">

**Author:** [@dainfoo](https://discourse.gohugo.io/u/dainfoo)\
**Replies:** 0\
**Last updated:** [January 6, 2025, 2:30am UTC](https://discourse.gohugo.io/t/how-to-configure-hugo-to-use-the-tailwindcss-v4-binary-instead-of-npm/53018 "2025-01-06T02:30:04Z")

</div>

Hi everybody, I’m new here. I’m building my first fully fledge website. I’m building the theme and the website to consume the theme. I want to use TailwindCSS v4, but I don’t want to use the npm CLI version. I have inst…

---

## [Utility classes not being built with hugo](https://discourse.gohugo.io/t/utility-classes-not-being-built-with-hugo/51871)

<div class="topic-metadata">

**Author:** [@DeviousCat](https://discourse.gohugo.io/u/DeviousCat)\
**Replies:** 7\
**Last updated:** [October 11, 2024, 7:12pm UTC](https://discourse.gohugo.io/t/utility-classes-not-being-built-with-hugo/51871 "2024-10-11T19:12:55Z")

</div>

When I use the postcss cli, my utility class shows up. But when I use hugo, it doesn’t. Here is my postcss configuration and the html file loading the css. PostCSS config module.exports = { plugins: { tailwindcss…

---

## [Hugo v0.121.0 + Tailwind in production](https://discourse.gohugo.io/t/hugo-v0-121-0-tailwind-in-production/51736)

<div class="topic-metadata">

**Author:** [@LucasMRC](https://discourse.gohugo.io/u/LucasMRC)\
**Replies:** 3\
**Last updated:** [October 2, 2024, 7:36am UTC](https://discourse.gohugo.io/t/hugo-v0-121-0-tailwind-in-production/51736 "2024-10-02T07:36:56Z")

</div>

Hey community! I work with a website built with Hugo that has thousands of pages. And I’ve been looking into the possibility to migrate the utility classes used there to tailwind’s. So I’m working in the implementation,…

---

## [Tailwind without PostCSS?](https://discourse.gohugo.io/t/tailwind-without-postcss/48837)

<div class="topic-metadata">

**Author:** [@huntsyea](https://discourse.gohugo.io/u/huntsyea)\
**Replies:** 2\
**Last updated:** [March 15, 2024, 9:19am UTC](https://discourse.gohugo.io/t/tailwind-without-postcss/48837 "2024-03-15T09:19:09Z")

</div>

I recently read this article How to add TailwindCSS 3 to a Hugo website in 2023? - sbero.dev and it walks out a fairly different approach to adding tailwind than the other approaches I have seen. Is it true that post is …

---

## [\[RESOLVED\] Tailwind PostCSS work with linux but don't work with windows](https://discourse.gohugo.io/t/resolved-tailwind-postcss-work-with-linux-but-dont-work-with-windows/47899)

<div class="topic-metadata">

**Author:** [@FR-Coco](https://discourse.gohugo.io/u/FR-Coco)\
**Replies:** 3\
**Last updated:** [January 21, 2024, 7:17pm UTC](https://discourse.gohugo.io/t/resolved-tailwind-postcss-work-with-linux-but-dont-work-with-windows/47899 "2024-01-21T19:17:00Z")

</div>

Hello, I’m using @dirkolbrich Hugo’s project with Tailwind CSS look my repository. The project is running fine on a Linux environment but doesn’t work on a Windows environment. I’ve tried reviewing the different Windows …

---

## [Tailwind CSS is changing Hugo Typography](https://discourse.gohugo.io/t/tailwind-css-is-changing-hugo-typography/45132)

<div class="topic-metadata">

**Author:** [@annis99](https://discourse.gohugo.io/u/annis99)\
**Replies:** 2\
**Last updated:** [July 5, 2023, 8:32am UTC](https://discourse.gohugo.io/t/tailwind-css-is-changing-hugo-typography/45132 "2023-07-05T08:32:33Z")

</div>

Hello, I am using the PaperMod theme for my Hugo blog, and I decided to add tailwind to edit some pages (mostly single pages such as about and contact pages). The issue, is that once I get Tailwind installed and running…

---

## [Cachebuster death loop](https://discourse.gohugo.io/t/cachebuster-death-loop/45068)

<div class="topic-metadata">

**Author:** [@carlmjohnson](https://discourse.gohugo.io/u/carlmjohnson)\
**Replies:** 11\
**Last updated:** [July 1, 2023, 8:23am UTC](https://discourse.gohugo.io/t/cachebuster-death-loop/45068 "2023-07-01T08:23:27Z")

</div>

I’m trying to use the Hugo 112 cachebuster feature, and basically anything I do results in a death loop in which the server builds the site, writes out a hugo\_stats.json, builds the site, writes out a hugo\_stats.json, et…

---

## [Applying default classes to HTML elements](https://discourse.gohugo.io/t/applying-default-classes-to-html-elements/43058)

<div class="topic-metadata">

**Author:** [@haarts](https://discourse.gohugo.io/u/haarts)\
**Replies:** 4\
**Last updated:** [February 20, 2023, 7:17pm UTC](https://discourse.gohugo.io/t/applying-default-classes-to-html-elements/43058 "2023-02-20T19:17:48Z")

</div>

Hello! I’m converting a static design (HTML/CSS) to a Hugo theme. The static design uses Tailwind. It is all plain CSS, no fancy preprocessor/javascript or anything. It has been relatively smooth sailing but now I come …

---

## [Tailwindcss + Tailwindcss-forms plugin purge issue, writeStats does not capture attribute selector](https://discourse.gohugo.io/t/tailwindcss-tailwindcss-forms-plugin-purge-issue-writestats-does-not-capture-attribute-selector/31968)

<div class="topic-metadata">

**Author:** [@dirkolbrich](https://discourse.gohugo.io/u/dirkolbrich)\
**Replies:** 9\
**Last updated:** [February 2, 2023, 12:09am UTC](https://discourse.gohugo.io/t/tailwindcss-tailwindcss-forms-plugin-purge-issue-writestats-does-not-capture-attribute-selector/31968 "2023-02-02T00:09:42Z")

</div>

Hey, I have encountered a problem purging TailwindCSS while using the tailwindcss-forms plugin. The current purge setup deletes all base styles to reset the input elements. My purge setup uses the hugo\_stats.json file t…

---

## [Tailwind active: before: opacity-35 and other classes just doesn't generate](https://discourse.gohugo.io/t/tailwind-active-before-opacity-35-and-other-classes-just-doesnt-generate/39849)

<div class="topic-metadata">

**Author:** [@onlinemantas](https://discourse.gohugo.io/u/onlinemantas)\
**Replies:** 2\
**Last updated:** [August 19, 2022, 3:26pm UTC](https://discourse.gohugo.io/t/tailwind-active-before-opacity-35-and-other-classes-just-doesnt-generate/39849 "2022-08-19T15:26:27Z")

</div>

Hi all, I’m using tailwind with hugo and some classes just don’t seem to generate like active: and before: (not to mention the arbitrary values which just don’t seem to work) using hugo 0.97.1 (too old maybe with tailw…

---

## [Hugo 0.92 with tailwind 3 - config trouble when assets dir is above site](https://discourse.gohugo.io/t/hugo-0-92-with-tailwind-3-config-trouble-when-assets-dir-is-above-site/38764)

<div class="topic-metadata">

**Author:** [@August1914](https://discourse.gohugo.io/u/August1914)\
**Replies:** 0\
**Last updated:** [May 23, 2022, 11:12pm UTC](https://discourse.gohugo.io/t/hugo-0-92-with-tailwind-3-config-trouble-when-assets-dir-is-above-site/38764 "2022-05-23T23:12:15Z")

</div>

I have tailwindcss installed and working on a Hugo site side by side with another Hugo site where tailwind configuration is broken. The broken site requires that assets are located in a directory above the site i.e: pr…

---

## [Can I use tailwindcss with Hugo modules?](https://discourse.gohugo.io/t/can-i-use-tailwindcss-with-hugo-modules/38148)

<div class="topic-metadata">

**Author:** [@pitifi9191](https://discourse.gohugo.io/u/pitifi9191)\
**Replies:** 7\
**Last updated:** [April 14, 2022, 2:12am UTC](https://discourse.gohugo.io/t/can-i-use-tailwindcss-with-hugo-modules/38148 "2022-04-14T02:12:41Z")

</div>

Hello there, Using Hugo modules I have gotten rid of all the node modules, but I need to reinstall again to make use of tailwindcss. Is there anyone who is familiar with or has used Tailwind CSS and PostCSS with Hugo mo…

---

## [Run PostCSS only when Markdown file changes](https://discourse.gohugo.io/t/run-postcss-only-when-markdown-file-changes/36740)

<div class="topic-metadata">

**Author:** [@mukhtharcm](https://discourse.gohugo.io/u/mukhtharcm)\
**Replies:** 10\
**Last updated:** [January 26, 2022, 9:14am UTC](https://discourse.gohugo.io/t/run-postcss-only-when-markdown-file-changes/36740 "2022-01-26T09:14:28Z")

</div>

I have upgraded my site to use Tailwind 3 using This method. When I run Hugo server with hugo server --templateMetrics --disableFastRender --verbose --templateMetricsHints, I can see that PostCss is running every time a…

---

## [Tailwind, prose, markdown - code samples show the: \` character](https://discourse.gohugo.io/t/tailwind-prose-markdown-code-samples-show-the-character/36106)

<div class="topic-metadata">

**Author:** [@baker](https://discourse.gohugo.io/u/baker)\
**Replies:** 4\
**Last updated:** [December 18, 2021, 12:50pm UTC](https://discourse.gohugo.io/t/tailwind-prose-markdown-code-samples-show-the-character/36106 "2021-12-18T12:50:46Z")

</div>

When I inline write i.e. {{ markdown . }} I wrap the one line snippet in \`tickmarks\` - the code gets correctly rendered in HTML - but will include the tickmarks \>\>\> \`{{ markdown . }}\` That seems to apply only the inlin…

[Next page](https://discourse.gohugo.io/tag/tailwind/2.md?match_all_tags=true&page=1&tags%5B%5D=tailwind)
