-
Notifications
You must be signed in to change notification settings - Fork 0
/
calc.css
127 lines (112 loc) · 2.22 KB
/
calc.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
html {
box-sizing: border-box;
font-size: 175%;
font-weight: 100;
line-height: 1.3;
}
body {
align-items: center;
background-image: linear-gradient(150deg, #da4a9e, #37a9eb);
display: flex;
height: 100vh;
justify-content: center;
font-family: monospace;
}
input,
textarea,
button, .calculator .calculator_display {
border: 0;
border-radius: 25;
background-color: #aaa6a646;
font-size: inherit;
font-family: inherit;
font-weight: inherit;
outline: none;
text-align: left;
padding: 1rem;
}
.container {
display: grid;
font-size: 1em;
}
.calculator {
border: 2px solid #37a9eb;
padding: 0px;
background: #aaa6a646;
width: 13em;
position: relative;
}
*,
*::before,
*::after {
box-sizing: inherit;
}
body {
margin: 0;
}
/* input:hover,
input:active,
input:focus,
textarea:hover,
textarea:active,
textarea:focus,
button:hover,
button:active,
button:focus {
outline: none;
} */
.container {
max-width: 30em;
}
.container > p {
text-align: center;
}
.calculator {
border-radius: 12px;
box-shadow: 0 0 40px 0px rgba(0, 0, 0, 0.15);
margin-left: auto;
margin-right: auto;
margin-top: 2em;
max-width: 30em;
overflow: hidden;
}
.calculator_display {
background-color: #222222;
color: #936aa0;
font-size: 1.714285714em;
padding: 0.5em 0.75em;
text-align: right;
}
.calculator_keys {
background-color: #999;
display: grid;
grid-gap: 1px;
grid-template-columns: repeat(4, 1fr);
}
.calculator_keys > * {
background-color: #fff;
padding: 0.5em 1em;
position: relative;
text-align: center;
}
.calculator_keys > *:active::before,
.calculator_keys > .is-depressed::before {
background-color: rgba(0, 0, 0, 0.2);
bottom: 0;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.8) inset;
content: "";
left: 0;
opacity: 0.3;
position: absolute;
right: 0;
top: 0;
z-index: 1;
}
.key-operator {
background-color: #eee;
}
.key-equal {
background-image: linear-gradient(to bottom, #d252f1, #680f51);
grid-column: -2;
grid-row: 2 / span 4;
}