Skip to content

Commit 090cb56

Browse files
committed
refactor(toast): update styles
1 parent 8699b1e commit 090cb56

File tree

4 files changed

+59
-3
lines changed

4 files changed

+59
-3
lines changed

core/src/components/toast/test/basic/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
id="translucent-color-toast"
119119
onclick="openToast({message: 'click to close', buttons: ['Close'], translucent: true, color: 'success'})"
120120
>
121-
Translucent Color Toast
121+
Translucent Color Toast (iOS theme only)
122122
</button>
123123

124124
<button

core/src/components/toast/toast.common.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
@import "../../themes/mixins" ;
1+
@import "../../themes/mixins";
2+
// Necessary for the mixins to work.
23
@import "../../themes/functions.string";
4+
@import "../../themes/functions.color";
35

46
// Toast
57
// --------------------------------------------------

core/src/components/toast/toast.ionic.scss

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,57 @@
1818

1919
z-index: 1001;
2020
}
21+
22+
.toast-wrapper {
23+
@include globals.margin(auto);
24+
25+
display: block;
26+
position: absolute;
27+
28+
opacity: 0.01;
29+
30+
z-index: 10;
31+
}
32+
33+
.toast-content {
34+
@include globals.padding(globals.$ionic-space-300, globals.$ionic-space-400);
35+
}
36+
37+
// Toast Button
38+
// --------------------------------------------------
39+
40+
.toast-layout-baseline .toast-button-group-start {
41+
@include globals.margin(null, null, null, globals.$ionic-space-400);
42+
}
43+
44+
.toast-layout-stacked .toast-button-group-start {
45+
@include globals.margin(globals.$ionic-space-400, globals.$ionic-space-400, null, null);
46+
}
47+
48+
.toast-layout-baseline .toast-button-group-end {
49+
@include globals.margin(null, globals.$ionic-space-400, null, null);
50+
}
51+
52+
.toast-layout-stacked .toast-button-group-end {
53+
@include globals.margin(null, globals.$ionic-space-400, globals.$ionic-space-400, null);
54+
}
55+
56+
.toast-button {
57+
@include globals.typography(globals.$ionic-body-md-link);
58+
@include globals.padding(0);
59+
60+
// necessary for ripple to work properly
61+
position: relative;
62+
63+
background-color: transparent;
64+
65+
overflow: hidden;
66+
}
67+
68+
// Toast Icon
69+
// --------------------------------------------------
70+
71+
.toast-icon,
72+
.toast-button-icon {
73+
font-size: globals.$ionic-font-size-600;
74+
}

core/src/components/toast/toast.native.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
font-family: $font-family-base;
66

77
z-index: $z-index-overlay;
8-
}
8+
}

0 commit comments

Comments
 (0)