Skip to content

Commit fcc31c1

Browse files
committed
Drop default plugins form, typography, and container-queries
taking care to fix up the form styling.
1 parent d4afb9d commit fcc31c1

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
<%%= form_with url: password_path(params[:token]), method: :put, class: "contents" do |form| %>
99
<div class="my-5">
10-
<%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
10+
<%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
1111
</div>
1212

1313
<div class="my-5">
14-
<%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
14+
<%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
1515
</div>
1616

1717
<div class="inline">

lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<%%= form_with url: passwords_path, class: "contents" do |form| %>
99
<div class="my-5">
10-
<%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
10+
<%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
1111
</div>
1212

1313
<div class="inline">

lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111

1212
<%%= form_with url: session_url, class: "contents" do |form| %>
1313
<div class="my-5">
14-
<%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
14+
<%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
1515
</div>
1616

1717
<div class="my-5">
18-
<%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
18+
<%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
1919
</div>
2020

2121
<div class="col-span-6 sm:flex sm:items-center sm:gap-4">

lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@
1515
<div class="my-5">
1616
<% if attribute.password_digest? -%>
1717
<%%= form.label :password %>
18-
<%%= form.password_field :password, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
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" %>
1919
</div>
2020

2121
<div class="my-5">
2222
<%%= form.label :password_confirmation %>
23-
<%%= form.password_field :password_confirmation, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
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" %>
2424
<% elsif attribute.attachments? -%>
2525
<%%= 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 px-3 py-2 mt-2 w-full" %>
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" %>
2727
<% else -%>
2828
<%%= form.label :<%= attribute.column_name %> %>
2929
<% 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 px-3 py-2 mt-2 w-full" %>
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" %>
3131
<% elsif attribute.field_type == :checkbox || attribute.field_type == :check_box -%>
32-
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block mt-2 h-5 w-5" %>
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" %>
3333
<% else -%>
34-
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
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" %>
3535
<% end -%>
3636
<% end -%>
3737
</div>

lib/install/tailwind.config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ module.exports = {
1515
},
1616
},
1717
plugins: [
18-
require('@tailwindcss/forms'),
19-
require('@tailwindcss/typography'),
20-
require('@tailwindcss/container-queries'),
18+
// require('@tailwindcss/forms'),
19+
// require('@tailwindcss/typography'),
20+
// require('@tailwindcss/container-queries'),
2121
]
2222
}

0 commit comments

Comments
 (0)