Skip to content

Checkbox spreads over the entire area #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
enderahmetyurt opened this issue Oct 8, 2024 · 1 comment · Fixed by #416
Closed

Checkbox spreads over the entire area #415

enderahmetyurt opened this issue Oct 8, 2024 · 1 comment · Fixed by #416

Comments

@enderahmetyurt
Copy link
Contributor

Hey,

I created my projects running rails new my-todo-app --main --css=tailwind and I created a scaffold model rails g scaffold Task title:string description:text completed:boolean due_date:datetime it created a form but checkbox looks weird even this line https://github.com/rails/tailwindcss-rails/blob/main/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt#L31

it generated this code line in _form.html.erb

  <div class="my-5">
    <%= form.label :completed %>
    <%= form.checkbox :completed, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
  </div>

Screenshot 2024-10-08 at 14 04 00

I was expecting it wouldn't be cover all width, but it did.

What should I do?

@enderahmetyurt
Copy link
Contributor Author

I see the problem :) The form is generating checkedbox but here https://github.com/rails/tailwindcss-rails/blob/main/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt#L31 it's check_box I can fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant