Skip to content

Commit

Permalink
Merge branch 'rails:main' into feature/engines-convention-over-config…
Browse files Browse the repository at this point in the history
…uration-support
  • Loading branch information
bopm authored Mar 3, 2025
2 parents d4e1acf + 0144d00 commit 495b521
Show file tree
Hide file tree
Showing 18 changed files with 243 additions and 120 deletions.
40 changes: 29 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,58 @@
# `tailwindcss-rails` Changelog

## v4.0.0.rc4 / 2025-01-27
## v4.2.0 / 2025-03-02

- The input file `app/assets/tailwind/application.tailwind.css` has been renamed to `app/assets/tailwind/application.css`.
- Updated README docs on using the upgrade tool to update class names. @EricGusmao
### Features

* Improve the view templates to display better on mobile devices. #503 @patriciomacadden
* Support for environment variable `TAILWINDCSS_DEBUG` to turn off CSS minification. #504 @r-sierra


## v4.1.0 / 2025-02-19

### View template improvements

## v4.0.0.rc3 / 2025-01-27
* Field outlines are no longer hidden, and the focus border is brighter. #489 @rubys
* Boolean fields are improved (checkbox labels aligned, "Yes"/"No" instead of "true"/"false"). #454 @patriciomacadden
* Attachment links are consistently spaced and styled. #460 @patriciomacadden
* Index page links to Show, Edit, and Destroy for each resource. #460 @patriciomacadden @flavorjones
* Turbo confirm prompt added to Destroy links. #498 @patriciomacadden


## v4.0.0 / 2025-02-01

### Upgrade to Tailwind CSS v4

General changes:

- Dependency on `tailwindcss-ruby` set to `~> 4.0`.
- The dependency on `tailwindcss-ruby` is set to `~> 4.0`.
- The location of (optional) `postcss.config.js` has moved from the `config/` directory to the app root.
- The location of `application.tailwind.css` has moved from `app/assets/stylesheets` to `app/assets/tailwind`. If Propshaft is being used, `app/assets/tailwind` will be excluded from its asset handling.
- The input file `app/assets/tailwind/application.tailwind.css` has been renamed to `app/assets/tailwind/application.css`.
- If Propshaft is being used, `app/assets/tailwind` will be excluded from its asset handling.
- The Inter font is no longer packaged with the gem.
- Some Tailwind class names in the generated ERB templates are updated for v4.
- The README is updated to contain verbose instructions on upgrading.

Changes to the `tailwindcss:install` task:

- The `tailwindcss:install` task no longer installs `config/tailwind.config.js`.
- The `tailwindcss:install` task no longer installs `config/tailwind.config.js`, as v4 recommends placing Tailwind configuration in the CSS file.
- The Inter font is no longer configured in the application layout.
- Some Tailwind class names in the ERB templates are updated for v4.
- The "tailwind" stylesheet link tag will only be added to the application layout if Propshaft isn't in use and already handling `app/assets/build/tailwind.css`. Previously it was always injected, resulting in the tag being rendered twice if Propshaft was in use.
- The "tailwind" stylesheet link tag will only be added to the application layout if Propshaft isn't in use and therefore already handling `app/assets/build/tailwind.css`. Previously it was always injected, resulting in the tag being rendered twice if Propshaft was in use.

New task `tailwindcss:upgrade` upgrades many apps cleanly:

- Cleans up some things in the generated `config/tailwind.config.js`.
- Cleans up `config/tailwind.config.js` and references it from the CSS file as recommended for v4 upgrades.
- Runs the upstream upgrader (note: requires `npx` to run the one-time upgrade, but highly recommended).
- Removes configuration for the Inter font from the application layout.
- If present, moves `config/postcss.config.js` to the root directory.
- The "tailwind" stylesheet link tag will be removed if Propshaft is in use and already handling `app/assets/build/tailwind.css`.
- The input file `application.tailwind.css` will be moved from `app/assets/stylesheets` to `app/assets/tailwind`.
- The input file `app/assets/tailwind/application.tailwind.css` will be moved to `app/assets/tailwind/application.css`.

Thanks to @EricGusmao, @patriciomacadden, @excid3, and @brunoprietog for their feedback, contributions, and advice on v4 support.

### Other changes

- The gem's Rails generators are now hidden in the `rails g --help` output. #483 @patriciomacadden

## v3.3.1 / 2025-01-23

Expand Down
39 changes: 20 additions & 19 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
tailwindcss-rails (4.0.0.rc4)
tailwindcss-rails (4.1.0)
railties (>= 7.0.0)
tailwindcss-ruby (~> 4.0)

Expand Down Expand Up @@ -69,7 +69,7 @@ GEM
pp (>= 0.6.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
logger (1.6.5)
logger (1.6.6)
loofah (2.24.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand All @@ -81,26 +81,27 @@ GEM
mini_mime (1.1.5)
mini_portile2 (2.8.8)
minitest (5.25.4)
net-imap (0.5.5)
net-imap (0.5.6)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.5.0)
nokogiri (1.18.2)
net-smtp (0.5.1)
net-protocol
nokogiri (1.18.3)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.18.2-aarch64-linux-gnu)
nokogiri (1.18.3-aarch64-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.2-arm-linux-gnu)
nokogiri (1.18.3-arm-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.2-arm64-darwin)
nokogiri (1.18.3-arm64-darwin)
racc (~> 1.4)
nokogiri (1.18.2-x86_64-darwin)
nokogiri (1.18.3-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.18.2-x86_64-linux-gnu)
nokogiri (1.18.3-x86_64-linux-gnu)
racc (~> 1.4)
pp (0.6.2)
prettyprint
Expand All @@ -109,7 +110,7 @@ GEM
date
stringio
racc (1.8.1)
rack (3.1.8)
rack (3.1.10)
rack-session (2.1.0)
base64 (>= 0.1.0)
rack (>= 3.0.0)
Expand All @@ -133,24 +134,24 @@ GEM
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.2.1)
rdoc (6.11.0)
rdoc (6.12.0)
psych (>= 4.0.0)
reline (0.6.0)
io-console (~> 0.5)
securerandom (0.4.1)
stringio (3.1.2)
tailwindcss-ruby (4.0.0)
tailwindcss-ruby (4.0.0-aarch64-linux-gnu)
tailwindcss-ruby (4.0.0-arm64-darwin)
tailwindcss-ruby (4.0.0-x86_64-darwin)
tailwindcss-ruby (4.0.0-x86_64-linux-gnu)
stringio (3.1.3)
tailwindcss-ruby (4.0.7)
tailwindcss-ruby (4.0.7-aarch64-linux-gnu)
tailwindcss-ruby (4.0.7-arm64-darwin)
tailwindcss-ruby (4.0.7-x86_64-darwin)
tailwindcss-ruby (4.0.7-x86_64-linux-gnu)
thor (1.3.2)
timeout (0.4.3)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uri (1.0.2)
useragent (0.16.11)
zeitwerk (2.7.1)
zeitwerk (2.7.2)

PLATFORMS
aarch64-linux
Expand Down
Loading

0 comments on commit 495b521

Please sign in to comment.