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

Double bottom border on collapsed cards #27108

Closed
janno42 opened this issue Aug 20, 2018 · 3 comments
Closed

Double bottom border on collapsed cards #27108

janno42 opened this issue Aug 20, 2018 · 3 comments

Comments

@janno42
Copy link

janno42 commented Aug 20, 2018

When collapsing cards (e.g. in an accordion), the header has a bottom border that is rendered on top of the bottom border of the card itself. It results in two borders to be rendered, which (especially for the last card with rounded edges) looks wrong:
double_bottom_border
Depending on the used browser and zoom settings there can even be a small gap between the two border lines.

#23839 improved the layout of cards as collapsible elements but didn't change the double bottom border.

I would expect that the border of the header is not shown for a collapsed card.

@MelissaWeirick
Copy link

MelissaWeirick commented Aug 22, 2018

Use the {border-collapse: collapse;} property? Sorry first response so still trying to figure out how Github Works

@royklutman
Copy link
Contributor

I might have a fix for this, but I am not really sure if setting overflow: hidden on cards in an accordion is best practice, might also need some thorough review and testing:

.accordion {
  .card {
    overflow: hidden;
  }
  
  .card-header {
    margin-bottom: -1px;
  }
}

See this CodePen: https://codepen.io/anon/pen/JaGzNL?editors=1100#0

Maybe @andresgalante or @XhmikosR can shed some light on this case.

@XhmikosR
Copy link
Member

The patch above seems fine, but I haven't tested it, just the logic makes sense. Feel free to make a PR to discuss any proposed fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants