Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

fix(card): add color property to md-card.md-THEME_NAME-theme style #7689

Closed
wants to merge 1 commit into from
Closed
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 src/components/card/card-theme.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$card-border-radius: 2px !default;

md-card.md-THEME_NAME-theme {
color: '{{foreground-1}}';
background-color: '{{background-hue-1}}';
border-radius: $card-border-radius;

Expand Down
13 changes: 8 additions & 5 deletions src/components/card/demoBasicUsage/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div ng-controller="AppCtrl" ng-cloak >
<md-content class="md-padding" layout-xs="column" layout="row">
<div flex-xs flex-gt-xs="50" layout="column">
<md-card>
<md-card md-theme="{{ showDarkTheme ? 'dark-grey' : 'default' }}" md-theme-watch>
<md-card-title>
<md-card-title-text>
<span class="md-headline">Card with image</span>
Expand All @@ -16,10 +16,10 @@
<md-button>Action 2</md-button>
</md-card-actions>
</md-card>
<md-card>
<md-card md-theme="{{ showDarkTheme ? 'dark-orange' : 'default' }}" md-theme-watch>
<md-card-title>
<md-card-title-text>
<span class="md-headline">Card with image</span>
<span class="md-headline">Card with image</span>
<span class="md-subhead">Extra Large</span>
</md-card-title-text>
</md-card-title>
Expand All @@ -41,7 +41,7 @@
</md-card>
</div>
<div flex-xs flex-gt-xs="50" layout="column">
<md-card>
<md-card md-theme="{{ showDarkTheme ? 'dark-purple' : 'default' }}" md-theme-watch>
<md-card-title>
<md-card-title-text>
<span class="md-headline">Card with image</span>
Expand All @@ -56,7 +56,7 @@
<md-button>Action 2</md-button>
</md-card-actions>
</md-card>
<md-card>
<md-card md-theme="{{ showDarkTheme ? 'dark-blue' : 'default' }}" md-theme-watch>
<md-card-title>
<md-card-title-text>
<span class="md-headline">Card with image</span>
Expand All @@ -71,6 +71,9 @@
<md-button>Action 2</md-button>
</md-card-actions>
</md-card>
<div layout-padding>
<md-checkbox ng-model="showDarkTheme">Dark Theme Cards</md-checkbox>
</div>
</div>
</md-content>
</div>
6 changes: 6 additions & 0 deletions src/components/card/demoBasicUsage/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ angular.module('cardDemo1', ['ngMaterial'])

.controller('AppCtrl', function($scope) {
$scope.imagePath = 'img/washedout.png';
})
.config(function($mdThemingProvider) {
$mdThemingProvider.theme('dark-grey').backgroundPalette('grey').dark();
$mdThemingProvider.theme('dark-orange').backgroundPalette('orange').dark();
$mdThemingProvider.theme('dark-purple').backgroundPalette('deep-purple').dark();
$mdThemingProvider.theme('dark-blue').backgroundPalette('blue').dark();
});