Skip to content

Commit 12ecee5

Browse files
committed
Expose more CSS vars
1 parent 283e195 commit 12ecee5

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/ToastItem.svelte

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,17 @@ $: if (typeof item.progress !== 'undefined') {
5757
height: var(--toastHeight,auto);
5858
min-height: var(--toastMinHeight,3.5rem);
5959
margin: var(--toastMargin,0 0 0.5rem 0);
60+
padding: var(--toastPadding,0);
6061
background: var(--toastBackground,rgba(66,66,66,0.9));
6162
color: var(--toastColor,#FFF);
6263
box-shadow: var(--toastBoxShadow,0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -1px rgba(0,0,0,0.06));
64+
border: var(--toastBorder,none);
6365
border-radius: var(--toastBorderRadius,0.125rem);
6466
position: relative;
6567
display: flex;
6668
flex-direction: row;
6769
align-items: center;
70+
overflow: hidden;
6871
will-change: transform,opacity;
6972
-webkit-tap-highlight-color: transparent;
7073
}
@@ -86,16 +89,20 @@ $: if (typeof item.progress !== 'undefined') {
8689
outline: none;
8790
}
8891
._toastBar {
92+
top: var(--toastBarTop,auto);
93+
right: var(--toastBarRight,auto);
94+
bottom: var(--toastBarBottom,0);
95+
left: var(--toastBarLeft,0);
96+
height: var(--toastBarHeight,6px);
97+
width: var(--toastBarWidth,100%);
98+
position: absolute;
8999
display: block;
90100
-webkit-appearance: none;
91101
-moz-appearance: none;
92102
appearance: none;
93103
border: none;
94-
position: absolute;
95-
bottom: 0;
96-
width: 100%;
97-
height: 6px;
98104
background: transparent;
105+
pointer-events: none;
99106
}
100107
._toastBar::-webkit-progress-bar {
101108
background: transparent;

0 commit comments

Comments
 (0)