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

[Card] Adjust padding of Card.Section, footer and header #962

Merged
merged 1 commit into from
Feb 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f
- 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))
- 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))
- Changed the default value for `showHidden` prop on `ResourcePicker` for backward compatibility with legacy EASDK ([#981](https://github.com/Shopify/polaris-react/pull/981))
- 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))

### Documentation

Expand Down
17 changes: 12 additions & 5 deletions src/components/Card/Card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,19 @@
}

.Header {
padding: spacing() spacing() 0;
padding: spacing() spacing() rem(12px) spacing();

@include page-content-when-not-fully-condensed {
padding: spacing(loose) spacing(loose) 0;
padding-right: spacing(loose);
padding-left: spacing(loose);
}
}

.Section {
padding: spacing();

@include page-content-when-not-fully-condensed {
padding: spacing(loose);
padding: spacing() spacing(loose);
}

+ .Section {
Expand All @@ -42,6 +43,7 @@

.Section-subdued {
background-color: color('sky', 'lighter');
border-top: border-width() solid color('sky');
}

.SectionHeader {
Expand All @@ -61,9 +63,14 @@
.Footer {
display: flex;
justify-content: flex-end;
padding: 0 spacing() spacing();
padding: rem(12px) spacing() spacing() spacing();

@include page-content-when-not-fully-condensed {
padding: 0 spacing(loose) spacing(loose);
padding-right: spacing(loose);
padding-left: spacing(loose);
}

.Section-subdued + & {
border-top: border-width() solid color('sky');
}
}