-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
153 lines (152 loc) · 3.28 KB
/
style.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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: consolas;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #edf1f4;
}
.dark {
background: black;
}
.calculator {
position: relative;
width: 340px;
padding: 20px;
border-radius: 20px;
box-shadow: 15px 15px 20px rgba(0, 0, 0, 0.1), -15px -15px 20px #fff;
}
.dark .calculator {
background: #333;
box-shadow: 15px 15px 20px rgba(0, 0, 0, 0.25),
-15px -15px 20px rgb(255, 255, 255, 0.1);
}
.calculator .button {
position: relative;
display: grid;
}
.calculator .button #value {
position: relative;
grid-column: span 4;
user-select: none;
overflow: none;
width: 100%;
text-align: end;
color: #5166d6;
height: 100px;
line-height: 100px;
box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.1), inset -5px -5px 20px #fff;
border-radius: 10px;
margin-bottom: 10px;
padding: 0 20px;
font-size: 2rem;
font-weight: 500;
}
.dark .calculator .button #value {
color: #eee;
box-shadow: inset 15px 15px 20px rgba(0, 0, 0, 0.5),
inset -15px -15px 20px rgb(255, 255, 255, 0.1);
}
.calculator .button span {
position: relative;
padding: 10px;
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1), -5px -5px 20px #fff;
margin: 10px;
cursor: pointer;
user-select: none;
min-width: 40px;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.2rem;
color: #666;
border: 2px solid #edf1f4;
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1), -5px -5px 10px #fff;
border-radius: 8px;
}
.dark .calculator .button span {
color: #eee;
border: 2px solid #333;
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.25),
-5px -5px 10px rgb(255, 255, 255, 0.1);
}
.calculator .button span:active {
box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.1), inset -5px -5px 10px #fff;
color: red;
}
.dark .calculator .button span:active {
box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.25),
inset -5px -5px 10px rgb(255, 255, 255, 0.1);
color: red;
}
.calculator .button span#clear {
grid-column: span 2;
background: red;
color: #fff;
border: 2px solid #edf1f4;
}
.calculator .button span#plus {
grid-row: span 2;
background: green;
color: #fff;
border: 2px solid #edf1f4;
}
.calculator .button span#equal {
grid-row: span 2;
background: #2196f3;
color: #fff;
border: 2px solid #edf1f4;
}
.calculator
.button
span#equal:active
.calculator
.button
span#plus:active
.calculator
.button
span#clear:active {
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1), -5px -5px 10px #fff,
inset 5px 5px 10px rgba(0, 0, 0, 0.1);
}
.dark.calculator
.button
span#equal:active
.dark.calculator
.button
span#plus:active
.dark.calculator
.button
span#clear:active {
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1), -5px -5px 10px #fff,
inset 5px 5px 10px rgba(0, 0, 0, 0.1);
}
.toggleBtn {
position: fixed;
top: 20px;
right: 20px;
width: 20px;
height: 20px;
border-radius: 50%;
background: #555;
cursor: pointer;
border: 2px solid #edf1f4;
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1), -5px -5px 10px #fff;
}
.footer {
position: absolute;
justify-content: flex-start;
align-items: end;
bottom: 5px;
margin-bottom: 10px;
color: #2196f3;
padding-top: 20px;
}
.footer a{
color: #2196f3;
}