tailwindcss-rails 3.1.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 04dddb26b35c53025770f5914dacd0dea7c3dd7d527eef224d01a72ab7b449e4
4
- data.tar.gz: e53ffa06e0f833a00f1e20c0233741c0cde0b235803eaf94c02fbc4941b9b912
3
+ metadata.gz: 8ed443928edcf525c0f23ef68477bca7305c5d1f700b0b19e50caa1912aefbcb
4
+ data.tar.gz: 1538e3660060124de8677a827a36d1609c3d83e26cd6992f1fc86b9d9c056a1a
5
5
  SHA512:
6
- metadata.gz: 53542141b4d15c74a3cb8a50f3a55cc85ee443ec850554c9888cf6df84ed68d212c3cded00410b04d6796da7b2dcbc71291426ece5911ef4f823d4a36f9337c9
7
- data.tar.gz: fe22c1a7b49c6541262420afd6fca0d1947bbe6c97dff732ae4e69960e464194b5a561bf6ab8052a05a8d408caca60750fb3854e841091ba20517d3546db082b
6
+ metadata.gz: c5450e732306e39d5946b281183607baf68e322bd607310e0084aec8719e916ce378c53c6fe82f0d9959c7bb476511d61daf84a758355b44230e5e75137c9a72
7
+ data.tar.gz: 19ef39ff0bbe242e1e2156639bf7e22c67a1d2e86dfab3b0aba74d2365693e72652e74e1ceadab955225fb1edf5b5f5abf8077c63f2013b3f64c9b42f200a877
data/README.md CHANGED
@@ -151,7 +151,7 @@ Running `bin/dev` invokes Foreman to start both the Tailwind watch process and t
151
151
 
152
152
  ### Using with PostCSS
153
153
 
154
- If you want to use PostCSS as a preprocessor, create a custom `config/postcss.config.js` and it will be loaded automatically.
154
+ If you want to use PostCSS as a preprocessor, create a custom `config/postcss.config.js` and that file will be loaded by tailwind automatically.
155
155
 
156
156
  For example, to enable nesting:
157
157
 
@@ -167,6 +167,25 @@ module.exports = {
167
167
  }
168
168
  ```
169
169
 
170
+ ⚠ Note that PostCSS is a javascript tool with its own prerequisites! By default `tailwindcss-rails` does not require any javascript tooling, so in order to use PostCSS, a `package.json` with dependencies for your plugins and a package manager like `yarn` or `npm` is required, for example:
171
+
172
+ ```json
173
+ // package.json
174
+ {
175
+ "name": "my app",
176
+ "private": true,
177
+ "dependencies": {
178
+ "postcss-advanced-variables": "^4.0.0",
179
+ "postcss-import": "^16.0.1",
180
+ "postcss-mixins": "^9.0.4",
181
+ "tailwindcss": "^3.4.1"
182
+ }
183
+ }
184
+ ```
185
+
186
+ Then you can use yarn or npm to install the dependencies.
187
+
188
+
170
189
  ### Custom inputs or outputs
171
190
 
172
191
  If you need to use a custom input or output file, you can run `bundle exec tailwindcss` to access the platform-specific executable, and give it your own build options.
@@ -15,7 +15,7 @@
15
15
  </div>
16
16
 
17
17
  <div class="inline">
18
- <%%= form.submit "Save", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
18
+ <%%= form.submit "Save", class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
19
19
  </div>
20
20
  <%% end %>
21
21
  </div>
@@ -11,7 +11,7 @@
11
11
  </div>
12
12
 
13
13
  <div class="inline">
14
- <%%= form.submit "Email reset instructions", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
14
+ <%%= form.submit "Email reset instructions", class: "rounded-lg px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
15
15
  </div>
16
16
  <%% end %>
17
17
  </div>
@@ -20,11 +20,11 @@
20
20
 
21
21
  <div class="col-span-6 sm:flex sm:items-center sm:gap-4">
22
22
  <div class="inline">
23
- <%%= form.submit "Sign in", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
23
+ <%%= form.submit "Sign in", class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
24
24
  </div>
25
25
 
26
26
  <div class="mt-4 text-sm text-gray-500 sm:mt-0">
27
- <%%= link_to "Forgot password?", new_password_path, class: "text-gray-700 underline" %>
27
+ <%%= link_to "Forgot password?", new_password_path, class: "text-gray-700 underline hover:no-underline" %>
28
28
  </div>
29
29
  </div>
30
30
  <%% end %>
@@ -1,9 +1,9 @@
1
1
  <%%= form_with(model: <%= model_resource_name %>, class: "contents") do |form| %>
2
2
  <%% if <%= singular_table_name %>.errors.any? %>
3
- <div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-lg mt-3">
3
+ <div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-md mt-3">
4
4
  <h2><%%= pluralize(<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
5
5
 
6
- <ul>
6
+ <ul class="list-disc ml-6">
7
7
  <%% <%= singular_table_name %>.errors.each do |error| %>
8
8
  <li><%%= error.full_message %></li>
9
9
  <%% end %>
@@ -15,29 +15,29 @@
15
15
  <div class="my-5">
16
16
  <% if attribute.password_digest? -%>
17
17
  <%%= form.label :password %>
18
- <%%= form.password_field :password, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
19
- </div>
18
+ <%%= form.password_field :password, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password].any?}] %>
19
+ </div>
20
20
 
21
- <div class="my-5">
21
+ <div class="my-5">
22
22
  <%%= form.label :password_confirmation %>
23
- <%%= form.password_field :password_confirmation, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
23
+ <%%= form.password_field :password_confirmation, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password_confirmation].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password_confirmation].any?}] %>
24
24
  <% elsif attribute.attachments? -%>
25
25
  <%%= form.label :<%= attribute.column_name %> %>
26
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
26
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password].any?}] %>
27
27
  <% else -%>
28
28
  <%%= form.label :<%= attribute.column_name %> %>
29
29
  <% if attribute.field_type == :textarea || attribute.field_type == :text_area -%>
30
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
30
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
31
31
  <% elsif attribute.field_type == :checkbox || attribute.field_type == :check_box -%>
32
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 mt-2 h-5 w-5" %>
32
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow rounded-md border outline-none mt-2 h-5 w-5", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
33
33
  <% else -%>
34
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
34
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
35
35
  <% end -%>
36
36
  <% end -%>
37
37
  </div>
38
38
 
39
39
  <% end -%>
40
40
  <div class="inline">
41
- <%%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
41
+ <%%= form.submit class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
42
42
  </div>
43
43
  <%% end %>
@@ -1,8 +1,10 @@
1
- <div class="mx-auto md:w-2/3 w-full">
1
+ <%% content_for :title, "Editing <%= human_name.downcase %>" %>
2
+
3
+ <div class="md:w-2/3 w-full">
2
4
  <h1 class="font-bold text-4xl">Editing <%= human_name.downcase %></h1>
3
5
 
4
6
  <%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
5
7
 
6
- <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
7
- <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
8
+ <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
9
+ <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
8
10
  </div>
@@ -1,21 +1,25 @@
1
+ <%% content_for :title, "<%= human_name.pluralize %>" %>
2
+
1
3
  <div class="w-full">
2
4
  <%% if notice.present? %>
3
- <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%%= notice %></p>
5
+ <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%%= notice %></p>
4
6
  <%% end %>
5
7
 
6
- <%% content_for :title, "<%= human_name.pluralize %>" %>
7
-
8
8
  <div class="flex justify-between items-center">
9
9
  <h1 class="font-bold text-4xl"><%= human_name.pluralize %></h1>
10
- <%%= link_to "New <%= human_name.downcase %>", new_<%= singular_route_name %>_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
10
+ <%%= link_to "New <%= human_name.downcase %>", new_<%= singular_route_name %>_path, class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white block font-medium" %>
11
11
  </div>
12
12
 
13
13
  <div id="<%= plural_table_name %>" class="min-w-full">
14
- <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
15
- <%%= render <%= singular_table_name %> %>
16
- <p>
17
- <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(singular_table_name) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
18
- </p>
14
+ <%% if @<%= plural_table_name %>.any? %>
15
+ <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
16
+ <%%= render <%= singular_table_name %> %>
17
+ <p>
18
+ <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(singular_table_name) %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
19
+ </p>
20
+ <%% end %>
21
+ <%% else %>
22
+ <p class="text-center my-10">No <%= human_name.downcase.pluralize %> found.</p>
19
23
  <%% end %>
20
24
  </div>
21
25
  </div>
@@ -1,7 +1,9 @@
1
- <div class="mx-auto md:w-2/3 w-full">
1
+ <%% content_for :title, "New <%= human_name.downcase %>" %>
2
+
3
+ <div class="md:w-2/3 w-full">
2
4
  <h1 class="font-bold text-4xl">New <%= human_name.downcase %></h1>
3
5
 
4
6
  <%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
5
7
 
6
- <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
8
+ <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
7
9
  </div>
@@ -12,6 +12,5 @@
12
12
  <%%= <%= singular_name %>.<%= attribute.column_name %> %>
13
13
  <% end -%>
14
14
  </p>
15
-
16
15
  <% end -%>
17
16
  </div>
@@ -1,15 +1,17 @@
1
- <div class="mx-auto md:w-2/3 w-full flex">
2
- <div class="mx-auto">
3
- <%% if notice.present? %>
4
- <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%%= notice %></p>
5
- <%% end %>
6
-
7
- <%%= render @<%= singular_table_name %> %>
8
-
9
- <%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
10
- <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
11
- <div class="inline-block ml-2">
12
- <%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
13
- </div>
1
+ <%% content_for :title, "Showing <%= human_name.downcase %>" %>
2
+
3
+ <div class="md:w-2/3 w-full">
4
+ <%% if notice.present? %>
5
+ <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%%= notice %></p>
6
+ <%% end %>
7
+
8
+ <h1 class="font-bold text-4xl">Showing <%= human_name.downcase %></h1>
9
+
10
+ <%%= render @<%= singular_table_name %> %>
11
+
12
+ <%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "mt-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
13
+ <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
14
+ <div class="inline-block ml-2">
15
+ <%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, class: "mt-2 rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium" %>
14
16
  </div>
15
17
  </div>
@@ -1,3 +1,3 @@
1
1
  module Tailwindcss
2
- VERSION = "3.1.0"
2
+ VERSION = "3.2.0"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailwindcss-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2024-12-29 00:00:00.000000000 Z
10
+ date: 2025-01-10 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: railties