You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by "jamesfredley (via GitHub)" <gi...@apache.org> on 2026/05/03 19:06:23 UTC
[PR] Add grails-tailwindcss v8 guide [grails-static-website]
jamesfredley opened a new pull request, #493:
URL: https://github.com/apache/grails-static-website/pull/493
## Summary
Adds the **Tailwind CSS 4 with Grails 8** guide as the second Grails 8 sample-app-flavour guide on the site, following the precedent set by [PR #479 (grails-fields-custom-widgets-and-wrappers v8)](https://github.com/apache/grails-static-website/pull/479).
The guide walks readers through wiring Tailwind CSS 4 into a fresh Grails 8 GSP application via a Gradle-driven `npx @tailwindcss/cli` build step, with class-based dark mode and a small `@apply` component layer. It's the natural complement to the Fields plugin guide for teams that want to keep the GSP view layer but move off Bootstrap to a modern utility-first CSS pipeline.
## What's in the PR
- `conf/guides.yml` - new `grails-tailwindcss` registry entry (alphabetical insertion between `grails-spring-security-core-plugin-custom-authentication` and `grails-taglib-wyswyg-trix`); `versions['8']` block with `sourcePath`, `tags`, `sampleRef` (`grails-guides/grails-tailwindcss` on `grails8`), and the inline `toc:` mapping that drives the table of contents.
- `guides/grails-tailwindcss/v8/guide/*.adoc` - 14 short chapter files spanning the integration end to end.
- `guides/grails-tailwindcss/v8/snippets/` - vendored `package.json`, `src/main/css/input.css`, `build.gradle` (Tailwind block tagged `tailwind` for `[tag=tailwind]` includes), the rewritten `main.gsp` and `index.gsp`, and the simplified asset-pipeline manifest.
## Upstream sample app
[`grails-guides/grails-tailwindcss`](https://github.com/grails-guides/grails-tailwindcss) on the `grails8` branch (default branch) contains the standard `initial/` + `complete/` layout. `initial/` is a vanilla Grails 8 SNAPSHOT starter from `https://prev-snapshot.grails.org`; `complete/` is the same starter with all Tailwind customisations from this guide applied.
## Verification
- `./gradlew validateGuides -PvalidationMode=both` returns `86 guide(s) parsed, 0 SKIP-warned, 0 errors`. The `mode=both` run verifies that `grails-guides/grails-tailwindcss#grails8` exists.
- `./gradlew renderGuide_grails_tailwindcss_8 --rerun-tasks --no-configuration-cache` renders all 14 chapter HTML pages with no Unresolved directive errors and clean prev/next navigation. (`--no-configuration-cache` mirrors the existing `publishMainSite` workaround in 0a0201f898; the `PublishGuideTask` is not configuration-cache-safe yet.)
- The `complete/` Tailwind pipeline was exercised end to end on a fresh checkout: `npm install` adds 27 packages, `npx @tailwindcss/cli -i src/main/css/input.css -o grails-app/assets/stylesheets/app.css --minify` produces a 16,467-byte minified `app.css` against Tailwind 4.2.4 in 62ms.
## Notes for reviewers
- This is the second Grails 8 guide on the site; the first was [grails-fields-custom-widgets-and-wrappers v8](https://github.com/apache/grails-static-website/pull/479). I followed the same registry shape, the same `branch: 'grails8'` convention, and the same chapter-density target (5-25 lines per chapter, `include::../snippets/...[]` for verbatim source).
- The guide leads with Tailwind 4's CSS-first configuration (`@source` + `@custom-variant` directives in `input.css`) rather than the legacy `tailwind.config.js` approach. This matches the Tailwind project's own v4 recommendation; the JS-config path is mentioned for readers migrating from v3 but not made the primary recipe.
- `grails-app/assets/stylesheets/app.css` is git-ignored in the upstream `complete/` tree because it is regenerated by `tailwindBuild` on every Gradle build.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add grails-tailwindcss v8 guide [grails-static-website]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley merged PR #493:
URL: https://github.com/apache/grails-static-website/pull/493
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org