Skip to content

Commit 1ad9818

Browse files
committed
fix(card-title): add and document custom CSS properties
references #14850 references #14808
1 parent 7050039 commit 1ad9818

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

core/src/components/card-title/card-title.ios.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
// --------------------------------------------------
66

77
:host {
8+
--color: #{$card-ios-title-text-color};
9+
810
@include margin($card-ios-title-margin-top, $card-ios-title-margin-end, $card-ios-title-margin-bottom, $card-ios-title-margin-start);
911
@include padding($card-ios-title-padding-top, $card-ios-title-padding-end, $card-ios-title-padding-bottom, $card-ios-title-padding-start);
1012

11-
color: #{$card-ios-title-text-color};
12-
1313
font-size: $card-ios-title-font-size;
1414
font-weight: $card-ios-title-font-weight;
1515

core/src/components/card-title/card-title.md.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
// --------------------------------------------------
66

77
:host {
8+
--color: #{$card-md-title-text-color};
9+
810
@include margin($card-md-title-margin-top, $card-md-title-margin-end, $card-md-title-margin-bottom, $card-md-title-margin-start);
911
@include padding($card-md-title-padding-top, $card-md-title-padding-end, $card-md-title-padding-bottom, $card-md-title-padding-start);
1012

11-
color: #{$card-md-title-text-color};
12-
1313
font-size: $card-md-title-font-size;
1414

1515
line-height: 1.2;

core/src/components/card-title/card-title.scss

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
// --------------------------------------------------
66

77
:host {
8+
/**
9+
* @prop --color: Color of the card title
10+
*/
11+
812
display: block;
913
position: relative;
14+
15+
color: var(--color);
1016
}
1117

1218
:host(.ion-color) {
13-
// TODO can we remove important here
14-
/* stylelint-disable-next-line declaration-no-important */
15-
color: #{current-color(base)} !important;
19+
color: #{current-color(base)};
1620
}

0 commit comments

Comments
 (0)