forked from spookylukey/django-htmx-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodals.css
More file actions
35 lines (30 loc) · 763 Bytes
/
modals.css
File metadata and controls
35 lines (30 loc) · 763 Bytes
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
dialog {
/* Override some builtins that limit us: */
max-height: 100vh;
max-width: 100vw;
/* Positioning */
box-sizing: border-box;
width: calc(100vw - 40px);
height: calc(100vh - 40px);
top: 20px;
left: 20px;
position: fixed;
margin: 0;
/* Styling */
border: 0;
border-top: 2px solid #888;
padding: 20px;
/* Fade in: */
display: flex; /* for some reason, display: block disables the transition. */
flex-direction: column;
opacity: 0;
transition: opacity 0.15s;
pointer-events: none; /* necessary or the main page becomes inaccessible after closing dialog */
}
dialog[open] {
opacity: 1;
pointer-events: inherit;
}
dialog::backdrop {
background-color: #0008;
}