-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
212 lines (177 loc) · 3.79 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
*{
margin:0;
padding:0;
box-sizing: border-box;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
body{
background-color: #2b1d0f;
color:#fff;
}
header nav{
background-color: #212121;
padding: 20px;
display: flex;
justify-content: space-between;
align-items: center;
z-index: 1;/* jiska z-index zyada hta h vo text upr dikhta h*/
}
header nav h1{
font-size: 26px;
font-weight: 700;
letter-spacing: 1px;
text-transform: uppercase;
}
header nav form{
display: flex;
justify-content: center;
}
form input[type="text"]{
flex-grow: 1;
margin-right: 10px;
}
form input[type="text"],button[type="submit"]{
border:none;
font-size: 18px;
padding: 10px;
border-radius:4px ;
}
form button[type="submit"]{
background-color: #f44336;
color: #fff;
cursor: pointer;
transition: background-color 0.2s ease-in-out;/* taaki jb button pr cursor leke jae toh starting m transition dheere ho and jb cursor hatae tb bhi dheere ho*/
}
form button[type="submit"]:hover, .recipe button:hover, .recipe-close-btn:hover {
background-color:#ff5c5c;
}
/*main section css styling*/
.recipe-container{
text-align: center;
margin-top: 20px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
grid-gap:40px;
width:80%;
margin:10px auto;
padding: 20px;
place-items: center;
}
.recipe{
background-color: #fff;
display: flex;
flex-direction: column;
color:#000;
border-radius: 6px;
box-shadow: 0 5px 10px rgba(78,73,73,0.1), -5x -5px 10px rgba(34,34,34,0.5);
cursor: pointer;
max-width: 350px;
transition: transform 0.3s ease-in-out;
}
.recipe:hover{
transform: scale(1.02);/*bahar aata hua effect*/
}
.recipe img{
height: 300px;
}
.recipe h3{
font-size: 24px;
}
.recipe p{
font-size: 20px;
color: #4a4a4a;
margin: 5px 0;
}
.recipe span{
font-weight: 600;
}
.recipe button{
font-size: 20px;
font-weight: 600;
padding: 10px;
border: none;
border-radius: 4px;
cursor: pointer;
margin: 18px auto;
background-color: #f44336;
color: #fff;
}
.recipe-details{
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #694c2f;
-webkit-transform: translate(-50%,-50%);
border-radius: 12px;
width: 40%;
height: 60%;
font-size: 20px;
transition: all 0.5s ease-in-out;
overflow-y: scroll;
}
/*adding scroll bar to recipe detail popup*/
.recipe-details::-webkit-scrollbar{
width: 10px;
}
.recipe-details::-webkit-scrollbar-thumb{
background: #b5b5ba;
border: 16px;
--webkit-border-radius:16px;
}
.recipe-details-content{
padding: 30px;
}
.recipename{
text-align: center;
text-transform: uppercase;
text-decoration: underline;
margin-bottom: 10px;
}
.ingredientlist li{
margin-bottom: 10px;
margin-left: 20px;
}
.recipeinstructions p{
line-height: 30px;
white-space: pre-line;/*white spaces handle hre hai*/
}
.recipe-close-btn{
border:none;
font-size: 18px;
padding: 8px;
border-radius:4px ;
background-color: #f44336;
color: #fff;
position: absolute;
top: 20px;
right: 20px;
width: 30px;
height: 30px;
display: flex;
justify-content: center;
align-items: center;
}
.recipename,.ingredientlist,.recipeinstructions {
margin-bottom: 10px;
}
body::-webkit-scrollbar{
width: 16px;
}
body::-webkit-scrollbar-thumb{
background: #a1a1a1;
}
body::-webkit-scrollbar-track{
/*scroll bar ke background ko background*/
background: #ebebeb;
}
@media screen and (max-width:600px){
header nav{
flex-direction: column;
}
header nav form{
width: 80%;
margin-top: 20px;
}
}