-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.css
94 lines (84 loc) · 1.72 KB
/
example.css
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
:root {
--body-background: #fff;
--base-font-color: #000;
--active-color: blue;
--outline-color: blue;
--dialog-height: 200px;
--dialog-shift-top: calc(50% - (var(--dialog-height) / 2));
--dialog-z-index: 1;
--char-multiplication-sign: '\00D7';
--bg-overlay-color: rgba(17, 13, 13, 0.5);
}
/* html {
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: inherit;
}
body {
background: var(--body-background);
} */
dialog {
display: block;
padding: 0;
top: var(--dialog-shift-top);
visibility: hidden;
opacity: 0;
transition: opacity 0.5s;
}
dialog[open] {
visibility: visible;
opacity: 1;
}
dialog>div {
background: inherit;
position: relative;
padding: 1rem;
min-height: var(--dialog-height);
z-index: calc(var(--dialog-z-index) + 1);
}
dialog>button {
position: fixed;
text-decoration: none;
top: 0;
left: 0;
height: 100%;
width: 100%;
border: none;
cursor: pointer;
padding: 1rem;
background: var(--bg-overlay-color);
z-index: var(--dialog-z-index);
font-size: 0;
color: transparent;
}
dialog>button:focus::before {
outline: none;
box-shadow: 0 0 0.2em 0.3em var(--outline-color);
}
dialog>button::before {
font-family: Verdana, Geneva, sans-serif;
content: var(--char-multiplication-sign);
font-weight: bold;
background: var(--body-background);
border: 2px solid var(--bg-overlay-color);
position: absolute;
top: 1.5rem;
right: 1.5rem;
display: block;
color: var(--base-font-color);
font-size: 1.2rem;
width: 2rem;
height: 2rem;
border-radius: 50%;
line-height: 1.6rem;
text-align: center;
transition: border-color 0.5s, color 0.5s, box-shadow 0.1s;
}
dialog>button:focus::before,
dialog>button:hover::before {
border-color: var(--body-background);
color: var(--active-color);
}