-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
148 lines (124 loc) · 2.51 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
:root {
--light-green: #B7B7A4;
--med-green: #A5A58D;
--dark-green: #464b38;
--light-beige: #FFE8D6;
--med-beige: #DDBEA9;
--dark-beige: #CB997E;
--dark-font: #463f3a;
--button-font: 2rem courier-new, sans-serif;
--display-font:2rem courier-new, sans-serif;
}
body {
background-color: var(--dark-green);
display: flex;
flex-direction: column;
align-items: center;
}
.calculator {
background-color: var(--light-beige);
padding: 1.5rem 1.5rem 1.5rem;
margin-top: 2rem;
width: 25rem;
height: 40rem;
border-radius: 2rem;
box-shadow: 0px 5px 40px 5px black,
inset 5px -5px 20px 1px white;
display:flex;
flex-direction: column;
justify-content: space-between;
}
.display {
background-color: var(--med-green);
border-radius: 2rem;
height: 8rem;
font: var(--display-font);
inline-size: 22rem;
word-break: break-all;
box-shadow: inset 0px 4px 10px 4px var(--dark-green);
color: white;
display: flex;
flex-shrink: 1;
justify-content: end;
align-items: center;
padding: 0rem 1.5rem 0rem;
}
.row-1,
.row-2,
.row-3,
.row-4,
.row-5 {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.btn {
position: relative;
user-select: none;
height: 5.5rem;
width: 5.5rem;
background-color: var(--light-green);
border-radius: 50%;
font: var(--button-font);
color: white;
box-shadow: 0px 3px 10px 0px var(--dark-green);
transition: transform .3s ease;
display: flex;
justify-content: center;
align-items: center;
}
.row-5 {
gap: 1rem;
}
.row-5__equal {
flex-grow: 1;
border-radius: 2rem;
}
/* button animations */
.btn:hover {
transform: translate(0px, -5px);
}
.btn:active {
transform: translateY(1px);
}
.btn::after {
content: '';
position: absolute;
z-index: -1;
border-radius: 50%;
top: 0;
right: 0;
bottom: 0;
left: 0;
box-shadow: 0 10px 10px 1px var(--dark-green);
opacity:0;
transition: opacity .3s ease;
}
.equals::after {
border-radius: 2rem; /*adjusts for shape*/
}
.btn:hover::after {
opacity: 1;
}
.btn:active::after {
opacity: 0;
}
.backspace:hover,
.AC:hover {
background-color: #cc3333;
}
.percent:hover,
.operator:hover {
background-color: #8ecae6;
}
.percent:focus,
.operator:focus {
background: #8ecae6;
}
.equals:hover {
background-color: #99e051;
}
.decimal:hover,
.number:hover {
background-color: #a0a08d;
}