-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
108 lines (92 loc) · 1.66 KB
/
style.css
File metadata and controls
108 lines (92 loc) · 1.66 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
:root {
/* colors */
--dark: #111;
--light: #fff;
--dark-gray: #3e4149;
--light-gray: #717a89;
--green: #5ca19e;
--blue: #6fa4de;
--screen-color: #696c64;
--screen-text-color: #010204;
}
*, *::after, *::before {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
position: relative;
width: 100%;
height: 100vh;
font-family: monospace, sans-serif;
font-size: 14px;
background-color: #111;
color: #fff;
}
button {
border: none;
outline: none;
cursor: pointer;
}
.grid {
display: grid;
gap: 0.5rem;
}
/* custom properties */
#calculator {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 330px;
background-color: var(--dark-gray);
border-radius: 8px;
padding: 1rem;
}
.screen {
background-color: #fff;
padding: 10px;
border-radius: 4px;
margin-bottom: 1rem;
}
#result {
width: 100%;
height: 50px;
background-color: var(--light-gray);
border-radius: 8px;
margin-bottom: 0.5rem;
}
.buttons {
grid-template-rows: repeat(5, 1fr);
grid-template-columns: repeat(5, 1fr);
}
.btn {
padding: 10px;
text-align: center;
background-color: #d1d1d1;
border-radius: 4px;
}
.memories {
grid-template-columns: repeat(5, 1fr);
grid-template-rows: 1fr;
grid-column: 1 / 6;
grid-row: 1 / 2;
}
.numbers {
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(4, 1fr);
grid-column: 1 / 4;
grid-row: 2 / 6;
}
.operators {
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(4, 1fr);
grid-column: 4 / 6;
grid-row: 2 / 6;
}
.btn.memory {
background-color: var(--blue);
}
.btn.operator {
background-color: var(--green);
}