Skip to content

Commit bf00803

Browse files
committed
fix(note): separate note from item so its styles will alway be applied
this was discussed with Ben previously, fixes #9173
1 parent 8ae9047 commit bf00803

File tree

13 files changed

+111
-35
lines changed

13 files changed

+111
-35
lines changed

src/components/card/card.ios.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ $card-ios-header-color: #333 !default;
122122
padding-top: 0;
123123
}
124124

125-
.card-ios ion-note[item-left],
126-
.card-ios ion-note[item-right] {
125+
.card .note-ios {
127126
font-size: 1.3rem;
128127
}
129128

src/components/card/card.md.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ $card-md-header-color: #222 !default;
126126
padding-top: 0;
127127
}
128128

129-
.card-md ion-note[item-left],
130-
.card-md ion-note[item-right] {
129+
.card .note-md {
131130
font-size: 1.3rem;
132131
}
133132

src/components/card/card.wp.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ $card-wp-header-color: #222 !default;
128128
padding-top: 0;
129129
}
130130

131-
.card-wp ion-note[item-left],
132-
.card-wp ion-note[item-right] {
131+
.card .note-wp {
133132
font-size: 1.3rem;
134133
}
135134

src/components/card/test/advanced/main.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,10 @@ <h2>Card With An Inset Picture</h2>
7777
Listen
7878
</button>
7979
</ion-col>
80-
<ion-col no-padding text-right>
81-
<button ion-button icon-left clear small color="danger" class="activated">
82-
<ion-icon name="share"></ion-icon>
83-
Activated
84-
</button>
80+
<ion-col no-padding center padding-right text-right>
81+
<ion-note>
82+
11h ago
83+
</ion-note>
8584
</ion-col>
8685
</ion-row>
8786
</ion-grid>

src/components/item/item.ios.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ $item-ios-avatar-size: 3.6rem !default;
2121
/// @prop - Size of the thumbnail in the item
2222
$item-ios-thumbnail-size: 5.6rem !default;
2323

24-
/// @prop - Color of the note in the item
25-
$item-ios-note-color: darken($list-ios-border-color, 10%) !default;
26-
2724
/// @prop - Shows the detail arrow icon on an item
2825
$item-ios-detail-push-show: true !default;
2926

@@ -181,10 +178,6 @@ $item-ios-sliding-content-background: $list-ios-background-color !default;
181178
max-height: $item-ios-thumbnail-size;
182179
}
183180

184-
.item-ios ion-note {
185-
color: $item-ios-note-color;
186-
}
187-
188181

189182
// iOS Item Detail Push
190183
// --------------------------------------------------

src/components/item/item.md.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ $item-md-avatar-size: 4rem !default;
2121
/// @prop - Size of the thumbnail in the item
2222
$item-md-thumbnail-size: 8rem !default;
2323

24-
/// @prop - Color of the note in the item
25-
$item-md-note-color: darken($list-md-border-color, 10%) !default;
26-
2724
/// @prop - Shows the detail arrow icon on an item
2825
$item-md-detail-push-show: false !default;
2926

@@ -203,10 +200,6 @@ $item-md-sliding-content-background: $list-md-background-color !default;
203200
max-height: $item-md-thumbnail-size;
204201
}
205202

206-
.item-md ion-note {
207-
color: $item-md-note-color;
208-
}
209-
210203

211204
// Material Design Item Group
212205
// --------------------------------------------------

src/components/item/item.wp.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ $item-wp-avatar-size: 4rem !default;
2727
/// @prop - Size of the thumbnail in the item
2828
$item-wp-thumbnail-size: 8rem !default;
2929

30-
/// @prop - Color of the note in the item
31-
$item-wp-note-color: $input-wp-border-color !default;
32-
3330
/// @prop - Shows the detail arrow icon on an item
3431
$item-wp-detail-push-show: false !default;
3532

@@ -213,10 +210,6 @@ $item-wp-sliding-content-background: $list-wp-background-color !default;
213210
max-height: $item-wp-thumbnail-size;
214211
}
215212

216-
.item-wp ion-note {
217-
color: $item-wp-note-color;
218-
}
219-
220213

221214
// Windows Item Divider
222215
// --------------------------------------------------

src/components/list/test/headers/main.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<ion-item>
4343
<ion-icon name="home" item-left></ion-icon>
4444
Home
45-
<ion-note item-right>
45+
<ion-note item-right color="danger">
4646
Where the heart is
4747
</ion-note>
4848
</ion-item>

src/components/note/note.ios.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@import "../../themes/ionic.globals.ios";
2+
3+
// iOS Note
4+
// --------------------------------------------------
5+
6+
/// @prop - Text color of the note
7+
$note-ios-color: darken($list-ios-border-color, 10%) !default;
8+
9+
10+
.note-ios {
11+
color: $note-ios-color;
12+
}
13+
14+
15+
// Generate iOS Note Colors
16+
// --------------------------------------------------
17+
18+
@each $color-name, $color-base, $color-contrast in get-colors($colors-ios) {
19+
20+
.note-ios-#{$color-name} {
21+
color: $color-base;
22+
}
23+
24+
}

src/components/note/note.md.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@import "../../themes/ionic.globals.md";
2+
3+
// Material Design Note
4+
// --------------------------------------------------
5+
6+
/// @prop - Text color of the note
7+
$note-md-color: darken($list-md-border-color, 10%) !default;
8+
9+
10+
.note-md {
11+
color: $note-md-color;
12+
}
13+
14+
15+
// Generate Material Design Note Colors
16+
// --------------------------------------------------
17+
18+
@each $color-name, $color-base, $color-contrast in get-colors($colors-md) {
19+
20+
.note-md-#{$color-name} {
21+
color: $color-base;
22+
}
23+
24+
}

0 commit comments

Comments
 (0)