-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
168 lines (142 loc) · 2.65 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
@import url("https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600&display=swap");
* {
font-family: "Jost", sans-serif;
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
background: slateblue;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100dvh;
color: #222;
}
.container {
margin-block: auto;
width: 90%;
max-width: 480px;
background-color: #fff;
padding: 20px;
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
border-radius: 10px;
}
.container h1 {
line-height: 1;
text-align: center;
}
form#calculator {
margin-top: 20px;
display: grid;
grid-template-columns: repeat(2, auto);
gap: 10px;
}
form#calculator label {
display: block;
font-size: 0.85rem;
font-weight: 500;
text-transform: uppercase;
}
form#calculator input,
form#calculator select {
width: 100%;
border: 1px solid #ddd;
padding: 5px 10px;
border-radius: 5px;
text-align: center;
font-size: 1rem;
outline-color: slateblue;
}
form#calculator button {
border: none;
padding: 10px;
border-radius: 5px;
font-size: 1rem;
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
cursor: pointer;
color: #fff;
transition: filter 0.3s;
}
form#calculator button[type="reset"] {
background: #333;
}
form#calculator button[type="submit"] {
background: slateblue;
}
form#calculator button:hover {
filter: brightness(1.25);
}
div#result {
max-height: 0;
opacity: 0;
overflow: hidden;
transition: max-height 0.3s cubic-bezier(0.76, 0, 0.24, 1),
opacity 0.3s ease-in-out 0.3s;
}
div#result.show {
max-height: 500px;
opacity: 1;
}
.bmr {
margin-top: 20px;
display: grid;
justify-items: center;
gap: 10px;
}
.bmr span {
background: rgba(105, 90, 205, 0.15);
color: slateblue;
font-size: 0.85rem;
font-weight: 600;
padding: 0 10px;
border-radius: 10px;
}
.bmr h2 {
font-size: 4rem;
font-weight: 500;
line-height: 1;
color: slateblue;
}
.bmr p {
color: slategray;
font-weight: 500;
}
.daily-calories {
margin-top: 10px;
border: 1px solid #ddd;
border-radius: 5px;
}
.daily-calories h3 {
padding: 5px 10px;
text-align: center;
color: slateblue;
}
.activity-levels {
list-style-type: none;
border-top: 1px solid #ddd;
}
.activity-levels li {
padding: 5px 10px;
display: flex;
align-items: center;
justify-content: space-between;
}
.activity-levels li:nth-child(even) {
background: rgba(105, 90, 205, 0.05);
}
.activity-levels p {
line-height: 1.15;
}
.activity-levels .name {
display: block;
font-weight: 500;
color: #333;
}
.activity-levels .desc {
color: slategray;
}
.activity-levels .value {
font-weight: 500;
}