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

.list-group-flush within .card causes double border #20395

Closed
jabbett opened this issue Jul 28, 2016 · 7 comments
Closed

.list-group-flush within .card causes double border #20395

jabbett opened this issue Jul 28, 2016 · 7 comments

Comments

@jabbett
Copy link

jabbett commented Jul 28, 2016

Saw this locally when I upgraded to alpha 3, confirmed in the public documentation:

image

Seeing this in Chrome 51, Firefox 46, and Safari 9.1.2.

@judetucker
Copy link

+1 For me as well when migrating.

Also occurring in the plain list-in-a-card example.

screen shot 2016-07-28 at 10 45 16 am

Potentially this commit removed the different border when list groups are flush.
955e040#diff-cd8ec88dc7823a5c78f7111e37a78adbL37

@Starsam80
Copy link
Contributor

I thought that mdo fixed these with #19861 and #19885, but I guess he never fixed/reverted all of the changes he made.

@hugofloss
Copy link

Also occurring for me:

screen shot 2016-08-05 at 11 16 59

@judetucker
Copy link

judetucker commented Aug 5, 2016

Happy Friday! Since this seems to be a common problem and since the fix seems pretty benign, can this be added to the alpha.3.1 patch release?

@judetucker
Copy link

Hi @mdo, just wanted to follow up on this since its still present in the alpha.4 (http://v4-alpha.getbootstrap.com/components/card/#content-types)

Any chance this fix can catch the alpha.5 milestone?

@betorina
Copy link

Temporary fix / monkey patch:

// Documentation example: Remove double borders
.card > .list-group > .list-group-item {
  border-left: 0;
  border-right: 0;
}
// Plain list card example: Remove also first + last border
.card > .list-group > .list-group-item {
  border-left: 0;
  border-right: 0;
  &:first-of-type {
    border-top: 0;
  }
  &:last-of-type {
    border-bottom: 0;
  }
}

@jabbett
Copy link
Author

jabbett commented Sep 22, 2016

The above fix works when the .list-group is the only element within the .card. The following version allows for the .list-group to be combined with other elements within .card

.card > .list-group {
  > .list-group-item {
    border-left: 0;
    border-right: 0;
  }
  &:first-child .list-group-item:first-of-type {
    border-top: 0;
  }

  &:last-child .list-group-item:last-of-type {
    border-bottom: 0;
  }
}

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

6 participants