-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
119 lines (106 loc) · 2.53 KB
/
style.css
File metadata and controls
119 lines (106 loc) · 2.53 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
108
109
110
111
112
113
114
115
116
117
118
119
:root {
/* CSS HSL */
--emerald: hsla(145, 71%, 47%, 1);
--jet-black: hsla(180, 7%, 16%, 1);
--ghost-white: hsla(227, 100%, 98%, 1);
--amethyst: hsla(305, 41%, 47%, 1);
--charcoal: hsla(90, 1%, 31%, 1);
--size--2: clamp(0.7813rem, 0.7736rem + 0.0341vw, 0.8rem);
--size--1: clamp(0.9375rem, 0.9119rem + 0.1136vw, 1rem);
--size-0: clamp(1.125rem, 1.0739rem + 0.2273vw, 1.25rem);
--size-1: clamp(1.35rem, 1.2631rem + 0.3864vw, 1.5625rem);
--size-2: clamp(1.62rem, 1.4837rem + 0.6057vw, 1.9531rem);
--size-3: clamp(1.944rem, 1.7405rem + 0.9044vw, 2.4414rem);
--size-4: clamp(2.3328rem, 2.0387rem + 1.3072vw, 3.0518rem);
--size-5: clamp(2.7994rem, 2.384rem + 1.8461vw, 3.8147rem);
}
body {
font-family: "Clash Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
"Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
sans-serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100dvh;
}
.calculator {
background-color: var(--jet-black);
padding: 1rem;
border-radius: 1rem;
max-width: 15rem;
}
.calc__screen {
background-color: var(--charcoal);
margin-bottom: 1rem;
color: var(--ghost-white);
height: 5rem;
border-radius: 0.5rem;
font-weight: bold;
text-align: right;
padding-top: 1rem;
padding-right: 1rem;
font-size: var(--size-1);
}
.calc__buttons {
/* display: grid;
grid-template-columns: repeat(4, 1fr);*/
gap: 0.5rem;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.calc__buttons--btn {
display: inline-block;
padding: 0.85rem;
border-radius: 2rem;
height: 3.25rem;
width: 3.25rem;
border: none;
outline: none;
font-size: var(--size-0);
font-family: inherit;
font-weight: bold;
background-color: var(--charcoal);
color: var(--ghost-white);
position: relative;
overflow: hidden;
transition: 100ms ease-in-out;
}
.calc__buttons--btn:hover {
opacity: 0.85;
}
.calc__buttons--btn:active {
scale: 0.9;
}
.calc__buttons--btn::after {
content: "";
position: absolute;
height: 100%;
width: 100%;
top: 0;
left: 0;
border-radius: 5rem;
background-color: white;
opacity: 0.25;
scale: 0;
transition: 200ms ease-in-out;
}
.calc__buttons--btn:active::after {
scale: 1.5;
}
.calc__equals {
background-color: var(--emerald);
color: var(--charcoal);
}
.calc__clear {
font-size: var(--size-0);
display: block;
width: 15rem;
max-width: 100%;
background-color: hsl(0, 80%, 64%);
text-align: center;
border-radius: 0.5rem;
}
.calc__clear:active {
scale: 0.975;
}