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

fix(split-button): outlined split button right border duplication on hover #4763

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

betavs
Copy link
Contributor

@betavs betavs commented Nov 7, 2023

Fix #4758

Copy link

vercel bot commented Nov 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
primevue ⬜️ Ignored (Inspect) Visit Preview Nov 9, 2023 2:31am

@melloware
Copy link
Member

@betavs check this PR out: #4638

@FlipWarthog
Copy link
Contributor

I also think this might actually be a theme issue rather than a core CSS issue: https://github.com/primefaces/primevue/blob/master/public/themes/lara-light-blue/theme.css#L1777C46-L1781

The issue isn't present if you switch to Material theme, and it's compounded in other themes, like Mira.

@betavs
Copy link
Contributor Author

betavs commented Nov 8, 2023

@betavs check this PR out: #4638

I know !important is bad, but I find that other components use it internally

I think changing this code will solve the problem

from

.p-splitbutton .p-splitbutton-defaultbutton,
.p-splitbutton.p-button-rounded > .p-splitbutton-defaultbutton.p-button,
.p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button {
flex: 1 1 auto;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-right: 0 none;
}

to

    .p-splitbutton .p-splitbutton-defaultbutton,
    .p-splitbutton.p-button-rounded > .p-splitbutton-defaultbutton.p-button,
    .p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button,
    .p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button-outlined.p-button:hover {
        flex: 1 1 auto;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
        border-right: 0 none;
    }

@FlipWarthog
Copy link
Contributor

I know !important is bad, but I find that other components use it internally

Yeah my PR is removing it from most of the core component CSS. The linked issue references an article that explains !important within CSS layers; it's takes even higher precedence and is harder to override

I think changing this code will solve the problem

If that works, I think it's probably a better change if you want to update the PR.

@melloware fyi looks like this same issue exists in PrimeReact as well.

@melloware
Copy link
Member

@betavs i would update your PR with your suggestion.

@betavs
Copy link
Contributor Author

betavs commented Nov 9, 2023

@betavs i would update your PR with your suggestion.

I have updated the PR for your code review and testing.

@tugcekucukoglu tugcekucukoglu merged commit 3978ab2 into primefaces:master Dec 1, 2023
2 of 3 checks passed
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 this pull request may close these issues.

SplitButton: Outlined SplitButton right border duplication on hover
4 participants