Skip to content
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

Add cell styles for action buttons #2818

Merged
merged 1 commit into from
Mar 31, 2025

Conversation

goosys
Copy link
Contributor

@goosys goosys commented Mar 24, 2025

I've always been bothered by the lack of styling on action button cells (Edit/Destroy) , so I added some.

By setting a fixed width, these cells will no longer expand or shrink unnecessarily, keeping them consistently aligned at the right end of the table.

Before After
image image
image image
image image

@goosys goosys force-pushed the add-action-button-style branch 2 times, most recently from cbaf340 to 6ab2dc3 Compare March 24, 2025 07:57
@@ -42,6 +42,14 @@ button,
}
}


form.button_to { /* stylelint-disable selector-no-qualifying-type, selector-class-pattern */
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a class automatically generated by Rails' button_to, so it didn't conform to BEM rules.

@goosys goosys force-pushed the add-action-button-style branch from 6ab2dc3 to 7caa1a4 Compare March 27, 2025 06:02
@nickcharlton nickcharlton added the views-and-styles how administrate looks and is interacted with label Mar 31, 2025
This introduces a fixed with to the action buttons (edit/destroy) so
that they don't get squashed by other content. It also aligns them
consistently to the right, regardless of the width of the table itself.
@nickcharlton nickcharlton force-pushed the add-action-button-style branch from eace050 to 3e1b9aa Compare March 31, 2025 14:12
@nickcharlton nickcharlton merged commit d5a9b66 into thoughtbot:main Mar 31, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
views-and-styles how administrate looks and is interacted with
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants