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

ButtonGroup: Invalid alignement of icon and non-icon buttons #6556

Closed
filipbekic01 opened this issue Oct 11, 2024 · 2 comments
Closed

ButtonGroup: Invalid alignement of icon and non-icon buttons #6556

filipbekic01 opened this issue Oct 11, 2024 · 2 comments
Assignees
Labels
design-token Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@filipbekic01
Copy link

filipbekic01 commented Oct 11, 2024

Describe the bug

When I group button that has label only and another button that has icon only, alignement is broken. Looks like they are not horizontally aligned.

Adding display:flex on buttonGroup actually fix the problem, however I'm not sure how would you like to handle it.

image

Reproducer

https://stackblitz.com/edit/primevue-4-datatable-columngroup-filter-p9kgpj?file=src%2FApp.vue

PrimeVue version

4.x.x

Vue version

3.x

Language

ALL

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@filipbekic01 filipbekic01 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 11, 2024
@CCodam
Copy link

CCodam commented Oct 12, 2024

This is also an issue without using ButtonGroup.
The issue seems to be keeping the icons and text on the same baseline. I tried using Font Awesome icons instead, but that just gave me a third alignment.

Adding a vertical-align: bottom to the Buttons fixed all three alignments it for me

<Button pt:root:style="vertical-align: bottom" icon="pi pi-check"></Button>

Consider adding it to the .p-button style block in button/style/ButtonStyle.js

Also, it looks like you're trying to make something for which there is a specific component for, you might want to try out the SplitButton
https://primevue.org/splitbutton/

@filipbekic01
Copy link
Author

Split button works, thank you. However, I still think that icon and text should be perfectly aligned either way. Right?

@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working design-token and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 12, 2024
@tugcekucukoglu tugcekucukoglu added this to the 4.2.2 milestone Nov 12, 2024
@tugcekucukoglu tugcekucukoglu self-assigned this Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-token Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

3 participants