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

AccordionSummary first and last child's corners do not display as rounded #27418

Open
2 tasks done
datoslabs opened this issue Jul 23, 2021 · 6 comments
Open
2 tasks done
Labels
component: accordion This is the name of the generic UI component, not the React module! new feature New feature or request

Comments

@datoslabs
Copy link

When AccordionSummary is given an opaque background color, the first child's top-left/right and last child's bottom-left/right corners appear to be squared even though the MuiAccordion-rounded:first-child and MuiAccordion-rounded:last-child styles are correctly applied. This occurs because the AccordionSummary's corners are squared, stacking on top of the parent div (ie Accordion); when AccordionSummary's background color is transparent, this does not cause an issue but when its background color is opaque, the first and last Accordions' corners will appear as squared.

  • 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 😯

When AccordionSummary is given an opaque background color, the first child's top-left/right and last child's bottom-left/right corners appear to be squared instead of rounded.

Expected Behavior 🤔

Frist and last Accordion's corners should be rounded.

Steps to Reproduce 🕹

Steps:

  1. Open the Simple accordion example in codesandbox.io - https://codesandbox.io/s/ccmf9
  2. Note the first and last accordion's corners are rounded.
  3. Add style={{backgroundColor:'blue'}} to each of the AccordionSummary elements
  4. Corners are showing as squared.

Context 🔦

Accordion display should be consistent and its first and last child's corner rounding should not be affected by the AccordionSmmary's color.

Your Environment 🌎

Material-ui Accordion demo example.

@datoslabs datoslabs added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jul 23, 2021
@tancarlson
Copy link

Process Completed
image
image
image
I have solved the problem but does not pass the CI...

tancarlson:scc-branch

@tancarlson
Copy link

Those are the problem encountered

@eps1lon
Copy link
Member

eps1lon commented Aug 2, 2021

Thanks for the feedback.

Frozen repro with v5: https://codesandbox.io/s/basicaccordion-material-demo-forked-l3u0y?file=/demo.tsx

We could fix this by adding style={{overflow:'hidden'}} to the parent Accordion or applying the same border-radius to the AccordionDetails and AccordionSummary.

Would be nice if somebody could explore both of these approaches and file a PR with what they think works best so that we can investigate.

@eps1lon eps1lon added component: accordion This is the name of the generic UI component, not the React module! new feature New feature or request and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 2, 2021
@kinshukshah
Copy link

Hi @eps1lon I will take up the issue and create a PR.

@kinshukshah
Copy link

Hi @eps1lon I have created a Pull Request can you please go through it.

@kinshukshah
Copy link

These are the checks I am not able to pass can you help me
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: accordion This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants