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

add variables for background color of card header, content and footer #1619

Merged
merged 2 commits into from
Apr 8, 2018
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### Improvements

* #1619 Add $card-header-background-color, $card-content-background-color and $card-footer-background-color to allow different background customization for card elements
* #1669 Add `.is-expanded` modifier to `.buttons.has-addons`
* #1628 Add `.has-background` helpers for block background colors, like `.has-text`
* #1767 Added minified bundle with cleancss
Expand Down
15 changes: 15 additions & 0 deletions docs/_data/variables/components/card.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,25 @@
"name": "$card-header-weight",
"value": "$weight-bold"
},
"card-header-background-color": {
"id": "card-header-background-color",
"name": "$card-header-background-color",
"value": "none"
},
"card-content-background-color": {
"id": "card-content-background-color",
"name": "$card-content-background-color",
"value": "none"
},
"card-footer-border-top": {
"id": "card-footer-border-top",
"name": "$card-footer-border-top",
"value": "1px solid $border"
},
"card-footer-background-color": {
"id": "card-footer-background-color",
"name": "$card-footer-background-color",
"value": "none"
}
}
}
7 changes: 7 additions & 0 deletions sass/components/card.sass
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ $card-color: $text !default
$card-background-color: $white !default
$card-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1) !default

$card-header-background-color: none !default
$card-header-color: $text-strong !default
$card-header-shadow: 0 1px 2px rgba($black, 0.1) !default
$card-header-weight: $weight-bold !default

$card-content-background-color: none !default

$card-footer-background-color: none !default
$card-footer-border-top: 1px solid $border !default

.card
Expand All @@ -16,6 +20,7 @@ $card-footer-border-top: 1px solid $border !default
position: relative

.card-header
background-color: $card-header-background-color
align-items: stretch
box-shadow: $card-header-shadow
display: flex
Expand All @@ -42,9 +47,11 @@ $card-footer-border-top: 1px solid $border !default
position: relative

.card-content
background-color: $card-content-background-color
padding: 1.5rem

.card-footer
background-color: $card-footer-background-color
border-top: $card-footer-border-top
align-items: stretch
display: flex
Expand Down