-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
126 lines (102 loc) · 1.95 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
html {
font-size: 150%;
font-weight: 300;
font-family: "Roboto", Helvetica, Arial, sans-serif;
line-height: 1.4;
}
body {
display: flex;
background-image: linear-gradient(140deg, #ffc052, #ffffff);
justify-content: center;
align-items: center;
height: 100vh;
}
.calculator {
box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.3);
border-radius: 0.5em;
overflow: hidden;
}
.screen {
background-color: rgb(42, 42,42);
color: white;
width: 16.25rem;
padding: 0.75rem 1rem;
text-align: right;
font-size: calc(1rem * 1.2 * 1.2);
}
.key-container {
background: var(--grey-200);
display: grid;
grid-gap: 2px;
grid-template-columns: repeat(4, auto);
grid-template-areas:
". . . ."
"seven eight nine equal"
"four five six equal"
"one two three equal"
"zero decimal clear equal";
}
.key-container > button {
border: 0;
padding: 20px;
border-radius: 3px;
}
/*Allocate grid area*/
[data-key="1"] {
grid-area: one;
}
[data-key="2"] {
grid-area: two;
}
[data-key="3"] {
grid-area: three;
}
[data-key="4"] {
grid-area: four;
}
[data-key="5"] {
grid-area: five;
}
[data-key="6"] {
grid-area: six;
}
[data-key="7"] {
grid-area: seven;
}
[data-key="8"] {
grid-area: eight;
}
[data-key="9"] {
grid-area: nine;
}
[data-key="0"] {
grid-area: zero;
}
.decimal {
grid-area: decimal;
}
.clear {
grid-area: clear;
}
[data-key="equal"] {
grid-area: equal;
background-color: rgb(255, 211, 130);
}
[data-key="equal"]:active {
background-color: orange;
}
[data-type="operator"] {
background: orange;
}
[data-type="number"],
[data-type="clear"] {
background: #fff;
}
[data-type="operator"]:active,
[data-type="number"]:active,
[data-type="clear"]:active {
background: rgba(128, 128, 128, 0.445);
}
[data-state="selected"] {
background: rgba(255, 166, 0, 0.618);
}