Skip to content

Commit bdcbb7c

Browse files
authored
Merge pull request #962 from Shopify/Card-padding
[Card] Adjust padding of Card.Section, footer and header
2 parents 8c80975 + 06f7abf commit bdcbb7c

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

UNRELEASED.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f
2121
- Fixed the `DataTable` sort direction not reversing on second sort of the initially sorted column ([#918](https://github.com/Shopify/polaris-react/pull/918)) (thanks [@tabrez96](https://github.com/tabrez96) for the [issue report](https://github.com/Shopify/polaris-react/issues/873))
2222
- Allow `null` being passed to `value` in `TextField` ([#964](https://github.com/Shopify/polaris-react/pull/964)) (thanks [@mbaumbach](https://github.com/mbaumbach) for the [original issue](https://github.com/Shopify/polaris-react/issues/959))
2323
- Changed the default value for `showHidden` prop on `ResourcePicker` for backward compatibility with legacy EASDK ([#981](https://github.com/Shopify/polaris-react/pull/981))
24+
- Adjusted top and bottom padding to the header, footer and sections in `Card` to add space between action buttons in the header and footer and the card sections. ([#962](https://github.com/Shopify/polaris-react/pull/962))
2425

2526
### Documentation
2627

src/components/Card/Card.scss

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,19 @@
1717
}
1818

1919
.Header {
20-
padding: spacing() spacing() 0;
20+
padding: spacing() spacing() rem(12px) spacing();
2121

2222
@include page-content-when-not-fully-condensed {
23-
padding: spacing(loose) spacing(loose) 0;
23+
padding-right: spacing(loose);
24+
padding-left: spacing(loose);
2425
}
2526
}
2627

2728
.Section {
2829
padding: spacing();
2930

3031
@include page-content-when-not-fully-condensed {
31-
padding: spacing(loose);
32+
padding: spacing() spacing(loose);
3233
}
3334

3435
+ .Section {
@@ -42,6 +43,7 @@
4243

4344
.Section-subdued {
4445
background-color: color('sky', 'lighter');
46+
border-top: border-width() solid color('sky');
4547
}
4648

4749
.SectionHeader {
@@ -61,9 +63,14 @@
6163
.Footer {
6264
display: flex;
6365
justify-content: flex-end;
64-
padding: 0 spacing() spacing();
66+
padding: rem(12px) spacing() spacing() spacing();
6567

6668
@include page-content-when-not-fully-condensed {
67-
padding: 0 spacing(loose) spacing(loose);
69+
padding-right: spacing(loose);
70+
padding-left: spacing(loose);
71+
}
72+
73+
.Section-subdued + & {
74+
border-top: border-width() solid color('sky');
6875
}
6976
}

0 commit comments

Comments
 (0)