-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
121 lines (106 loc) · 2.61 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
html {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
height: 100%;
font-size: 22px;
}
@media (prefers-color-scheme: light) {
html {
--main-background: #ffb47b;
--calculator-background: #fff;
--calculator-color: #3a3a3a;
--button-border: #efefef;
--button-hover-background: #f2f2f2;
--button-active-background: #e2e7e7;
--special-button-background: #ff9a4c;
--special-button-hover-background: #ff882c;
--special-button-active-background: #fd760f;
}
}
@media (prefers-color-scheme: dark) {
html {
--main-background: #ed9049;
--calculator-background: #3a3a3a;
--calculator-color: #fff;
--button-border: #dedede;
--button-hover-background: #2a2a2a;
--button-active-background: #171717;
--special-button-background: #ff9a4c;
--special-button-hover-background: #ff882c;
--special-button-active-background: #fd760f;
}
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
background-color: var(--main-background);
padding: 0;
margin: 0;
}
.calculator {
width: 300px;
height: 600px;
box-shadow: 10px 10px 32px 0px rgba(63, 63, 63, 0.25);
background-color: var(--calculator-background);
}
.display {
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: safe flex-end;
gap: 20px;
padding: 10px;
text-align: right;
height: 50%;
overflow-y: auto;
}
.display p {
margin: 0;
color: var(--calculator-color);
}
.buttons {
box-sizing: border-box;
height: 50%;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(5, 1fr);
gap: 1px;
background-color: var(--button-border);
border-top: 1px solid var(--button-border);
}
.buttons > button {
border: none;
outline: none;
background-color: var(--calculator-background);
cursor: pointer;
font-size: 22px;
color: var(--calculator-color);
transition: all 0.2s linear;
}
.buttons > button:focus {
outline: solid 2px lightblue;
z-index: 1;
}
.buttons > button:hover {
background-color: var(--button-hover-background);
}
.buttons > button:active {
background-color: var(--button-active-background);
}
.buttons > button:nth-child(4n) {
background-color: var(--special-button-background);
}
.buttons > button:nth-child(4n):hover {
background-color: var(--special-button-hover-background);
}
.buttons > button:nth-child(4n):active {
background-color: var(--special-button-active-background);
}
@media (width <= 400px) {
.calculator {
width: 100%;
height: 100%;
}
}