Skip to content

Double bottom border on collapsed cards #27108

Closed

Description

@janno42

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.

Activity

  1. MelissaWeirick commented on Aug 22, 2018

    @MelissaWeirick

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

  2. royklutman commented on Aug 26, 2018

    @royklutman
    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.

  3. XhmikosR commented on Aug 26, 2018

    @XhmikosR
    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.

  4. added
    cssSass sources or compiled CSS
    v4v4, the frozen docs on gh-pages
    has-prAn open pull request addresses it
    on Oct 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cssSass sources or compiled CSShas-prAn open pull request addresses itv4v4, the frozen docs on gh-pages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions