Skip to content

Commit

Permalink
Fix card component padding based on heading
Browse files Browse the repository at this point in the history
Refined card component styling by removing the spacing from the first list item in a one-column list without a heading.

For lists with a border, padding/spacing is retained.
  • Loading branch information
CodeSonia committed Aug 23, 2024
1 parent 174cd7e commit 65516b4
Showing 1 changed file with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
@include govuk-responsive-margin(6, "bottom");
}

.gem-c-cards__heading--underline + .gem-c-cards__list {
border-top: 1px solid $govuk-border-colour;
}

.gem-c-cards__list {
list-style: none;
padding: 0;
Expand All @@ -34,6 +30,22 @@
.gem-c-cards__list-item {
&:first-child {
border-top: 0;

.gem-c-cards__list-item-wrapper {
padding-top: 0;
}
}
}
}

.gem-c-cards__heading--underline + .gem-c-cards__list {
border-top: 1px solid $govuk-border-colour;

.gem-c-cards__list-item {
&:first-child {
.gem-c-cards__list-item-wrapper {
padding-top: 19px;
}
}
}
}
Expand Down

0 comments on commit 65516b4

Please sign in to comment.