-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
133 lines (117 loc) · 2.53 KB
/
style.css
File metadata and controls
133 lines (117 loc) · 2.53 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
* {
margin: 0;
padding: 0;
user-select: none;
box-sizing: border-box;
}
body {
background: black;
}
:root {
--blade-lightness: 50%;
}
.content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100vh;
overflow: hidden;
}
.randomColorBtn {
cursor: pointer;
text-align: center;
outline: none;
margin-top: 50px;
width: 350px;
border-radius: 35px;
height: 70px;
font-size: 35px;
color: white;
font-weight: bold;
background: black;
border: white 5px solid;
}
.randomColorBtn:hover {
background: white;
color: black;
}
.lightsaber {
margin-top: 50vh;
grid-column: 1 / -1;
position: relative;
}
#on-off {
position: absolute;
width: 0;
height: 0;
}
/* Рукоятка светового меча */
.handle {
cursor: pointer;
display: block;
width: 14px;
height: 125px;
border-radius: 0 0 4px 4px;
background-image: linear-gradient(
black 0 10px,
orange 0 14px,
silver 0 15px,
black 0 20px,
silver 0 22px,
black 0 25px,
silver 0 27px,
black 0 30px,
silver 0 32px,
black 0 35px,
silver 0 37px,
black 0 40px,
silver 0 42px,
black 0 45px,
silver 0 47px,
black 0 50px,
silver 0 60px,
orange 60px 100px,
silver 50px 100%
);
}
/* Лезвие */
.blade {
position: absolute;
background: white;
cursor: pointer;
height: 350%;
width: 100%;
bottom: 100%;
border-radius: 100vw 100vw 0 0;
box-shadow: inset 0 0 4px
hsl(var(--blade-color) 100% var(--blade-lightness) / 1),
0 0 1em hsl(var(--blade-color) 100% var(--blade-lightness) / 0.8),
0 0 1.5em hsl(var(--blade-color) 100% var(--blade-lightness) / 0.7),
0 0 2em hsl(var(--blade-color) 100% var(--blade-lightness) / 0.5),
0 0 3em hsl(var(--blade-color) 100% var(--blade-lightness) / 0.3),
0 0 5em hsl(var(--blade-color) 100% var(--blade-lightness) / 0.2);
transition: transform 100ms ease-out;
transform-origin: bottom;
transition: 0s;
}
.blade::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
background: white;
border-radius: inherit;
z-index: 10;
}
/* Включение/Выключение светового меча */
#on-off:not(:checked) + .blade {
transform: scaleY(0);
transition: 1s;
}
#on-off:checked + .blade {
transform: scaleY(1);
}