Skip to content

Commit 7d8fd9a

Browse files
committed
Expose shorthand CSS vars instead and tweak colors
1 parent 73cefe9 commit 7d8fd9a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/ToastItem.svelte

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@ $: if (prevProgress !== item.progress) {
1717
}
1818
prevProgress = item.progress
1919
}
20-
2120
</script>
2221

2322
<style>
2423
._toastItem {
2524
width: var(--toastWidth,16rem);
2625
height: var(--toastHeight,3.5rem);
27-
margin-bottom: var(--toastMarginBottom,0.5rem);
28-
background: var(--toastBackground,rgba(74,85,104,0.98));
26+
margin: var(--toastMargin,0 0 0.5rem 0);
27+
background: var(--toastBackground,rgba(66,66,66,0.9));
2928
color: var(--toastColor,#FFF);
3029
box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -1px rgba(0,0,0,0.06);
3130
border-radius: 0.125rem;
@@ -37,7 +36,7 @@ $: if (prevProgress !== item.progress) {
3736
-webkit-tap-highlight-color: transparent;
3837
}
3938
._toastMsg {
40-
font-size: var(--toastFontSize,1rem);
39+
font: var(--toastFont);
4140
flex: 1 1 0%;
4241
padding: 0 0.5rem;
4342
}
@@ -66,10 +65,10 @@ $: if (prevProgress !== item.progress) {
6665
background: transparent;
6766
}
6867
._toastBar::-webkit-progress-value {
69-
background: var(--toastProgressBackground,rgba(66,153,225,0.98));
68+
background: var(--toastProgressBackground,rgba(33,150,243,0.75));
7069
}
7170
._toastBar::-moz-progress-bar {
72-
background: var(--toastProgressBackground,rgba(66,153,225,0.98));
71+
background: var(--toastProgressBackground,rgba(33,150,243,0.75));
7372
}
7473
</style>
7574

0 commit comments

Comments
 (0)