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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

group button styles are not quite correct. #21492

Closed
2 tasks done
cyphernull opened this issue Jun 18, 2020 · 3 comments 路 Fixed by #21532
Closed
2 tasks done

group button styles are not quite correct. #21492

cyphernull opened this issue Jun 18, 2020 · 3 comments 路 Fixed by #21532
Labels
component: ButtonGroup The React component. good first issue Great for first contributions. Enable to learn the contribution process.

Comments

@cyphernull
Copy link

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 馃槸

image
image
image

Expected Behavior 馃

the button background should not cover the separator between the buttons.

Steps to Reproduce 馃暪

Steps:

material-ui doc

Context 馃敠

Your Environment 馃寧

Tech Version
Material-UI v4.10.2
React --
Browser --
TypeScript --
etc.
@cyphernull cyphernull added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 18, 2020
@alecananian
Copy link
Contributor

The hover background color and border color are the same, that's what you're seeing in the second row of your screenshot. The third row looks different because the "TWO" button has a box shadow to its left on hover, which is darkening the left border.

Example with the hover box shadow disabled:
ButtonGroup

@oliviertassinari
Copy link
Member

@alecananian Great catch are you suggesting this diff?

diff --git a/packages/material-ui/src/ButtonGroup/ButtonGroup.js b/packages/material-ui/src/ButtonGroup/ButtonGroup.js
index e93ec47d7..9e40af65d 100644
--- a/packages/material-ui/src/ButtonGroup/ButtonGroup.js
+++ b/packages/material-ui/src/ButtonGroup/ButtonGroup.js
@@ -126,6 +126,9 @@ export const styles = (theme) => ({
   /* Styles applied to the children if `variant="contained"`. */
   groupedContained: {
     boxShadow: 'none',
+    '&:hover': {
+      boxShadow: 'none',
+    },
   },
   /* Styles applied to the children if `variant="contained"` and `orientation="horizontal"`. */
   groupedContainedHorizontal: {

@oliviertassinari oliviertassinari added component: ButtonGroup The React component. good first issue Great for first contributions. Enable to learn the contribution process. and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jun 21, 2020
@alecananian
Copy link
Contributor

I wasn't sure what the expected design was, since the same could be achieved with the disableElevation prop, but I do see that's a little different. The ButtonGroup wrapper already has a box shadow applied to it, so the extra shadow on hover appears to be a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ButtonGroup The React component. good first issue Great for first contributions. Enable to learn the contribution process.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants