-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathToast.css
More file actions
104 lines (89 loc) · 2.03 KB
/
Toast.css
File metadata and controls
104 lines (89 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
@import "./theme.css";
.react-aria-ToastRegion {
position: fixed;
bottom: var(--spacing-4);
right: var(--spacing-4);
display: flex;
flex-direction: column-reverse;
gap: var(--spacing-2);
border-radius: var(--radius-lg);
outline: none;
&[data-focus-visible] {
outline: 2px solid var(--focus-ring-color);
outline-offset: 2px;
}
}
.react-aria-Toast {
display: flex;
align-items: center;
gap: var(--spacing-4);
background: var(--tint-1000);
padding: var(--spacing-3) var(--spacing-4);
border-radius: var(--radius-lg);
outline: none;
forced-color-adjust: none;
view-transition-class: toast;
&[data-focus-visible] {
outline: 2px solid var(--focus-ring-color);
outline-offset: 2px;
}
.react-aria-ToastContent {
display: flex;
flex-direction: column;
flex: 1 1 auto;
min-width: 0;
font: var(--font-size) system-ui;
[slot=title] {
font-weight: 600;
color: var(--highlight-foreground);
}
[slot=description] {
font-size: var(--font-size-sm);
color: var(--highlight-foreground);
}
}
.react-aria-Button[slot=close] {
flex: 0 0 auto;
background: none;
border: none;
appearance: none;
border-radius: var(--radius-sm);
height: var(--spacing-8);
width: var(--spacing-8);
color: var(--highlight-foreground);
padding: 0;
outline: none;
-webkit-tap-highlight-color: transparent;
&[data-hovered] {
background: var(--tint-900);
box-shadow: none;
}
&[data-focus-visible] {
outline: 2px solid var(--highlight-foreground);
outline-offset: 2px;
}
&[data-pressed] {
background: var(--highlight-pressed);
}
}
}
::view-transition-new(.toast):only-child {
animation: slide-in 400ms;
}
::view-transition-old(.toast):only-child {
animation: slide-out 400ms;
animation-fill-mode: forwards;
}
@keyframes slide-out {
to {
translate: 100% 0;
opacity: 0;
visibility: hidden;
}
}
@keyframes slide-in {
from {
translate: 100% 0;
opacity: 0;
}
}