Skip to content

Commit

Permalink
fix(card-subtitle): add and document custom CSS properties
Browse files Browse the repository at this point in the history
references #14850 references #14808
  • Loading branch information
brandyscarney committed Aug 14, 2018
1 parent e92ff8a commit 7050039
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/src/components/card-subtitle/card-subtitle.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// --------------------------------------------------

:host {
--ion-color-base: #{$card-ios-subtitle-color};
--color: #{$card-ios-subtitle-color};

@include margin($card-ios-subtitle-margin-top, $card-ios-subtitle-margin-end, $card-ios-subtitle-margin-bottom, $card-ios-subtitle-margin-start);
@include padding($card-ios-subtitle-padding-top, $card-ios-subtitle-padding-end, $card-ios-subtitle-padding-bottom, $card-ios-subtitle-padding-start);
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/card-subtitle/card-subtitle.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// --------------------------------------------------

:host {
--ion-color-base: #{$card-md-subtitle-color};
--color: #{$card-md-subtitle-color};

@include margin($card-md-subtitle-margin-top, $card-md-subtitle-margin-end, $card-md-subtitle-margin-bottom, $card-md-subtitle-margin-start);
@include padding($card-md-subtitle-padding-top, $card-md-subtitle-padding-end, $card-md-subtitle-padding-bottom, $card-md-subtitle-padding-start);
Expand Down
10 changes: 9 additions & 1 deletion core/src/components/card-subtitle/card-subtitle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@
// --------------------------------------------------

:host {
/**
* @prop --color: Color of the card subtitle
*/

display: block;
position: relative;

color: #{current-color(base)};
color: var(--color);
}

:host(.ion-color) {
color: current-color(base);
}

0 comments on commit 7050039

Please sign in to comment.