-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalculatePercent.css
304 lines (293 loc) · 6.53 KB
/
calculatePercent.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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
*,*::after,*::before{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif;
}
body{background-color: #2d3436;}
/* the main container of the operations */
#calculator{
width: 50%;
height: fit-content;
background-color: #747d8c;
margin: auto;
position: relative;
margin-top: 50px;
padding: 15px;
border-radius: 10px;
}
/*all inputs*/
input{
width: 100%;
height: 30px;
cursor: pointer;
outline: none;
font-size: 20px;
}
/* to remove events from pointer */
#form1-taken-percent,#form1-percent-left,#finale-price,#money-amount,#money-different{
pointer-events: none;
}
/* to edit the input titles (h3) */
h3{
color: white;
display: inline-block;
margin-top:10px ;
margin-bottom: 10px;
}
/* editing paragraph */
p{color: white;}
/* editing paragraph in form 1 */
#form1-p{margin:10px 0px 20px 280px;font-size: 20px; width: 100%;}
/* form1 attributes */
#form1{
border-bottom: 2px solid black;
direction: rtl;
}
/* animated underline as a span*/
.underline{
display: block;
background-color: #e84118;
height: 3px;
width: 0;
transition: 500ms ;
pointer-events: none;
}
/* the selected spans (underline) on clicking at inputs will change the width to 100% in a transition */
#form1-percent:focus ~ #span1,#form1-num1:focus ~ #span2,#form1-num2:focus ~ #span3 {
width: 100%;
transition: 300ms ;
}
/* the form1 button attributes */
#btn-form1{
padding: 10px;
border: none;
background-color: #fff;
font-size: 18px;
margin-bottom: 25px;
cursor: pointer;
outline: none;
transition: 300ms;
}
/* hovering on the form1 button */
#btn-form1:hover{
background-color: #e84118;
transition: 300ms;
}
/* a button to reveal the way how the equation methode only for form1 */
#form1-way-button{
padding: 10px;
border: none;
background-color: #fff;
font-size: 18px;
margin-bottom: 25px;
cursor: pointer;
outline: none;
transition: 300ms;
}
/* hoverig on the way button */
#form1-way-button:hover{
background-color: #e84118;
transition: 300ms;
}
/* the form1 way */
/*form1 how-to div start*/
/* the how-to div that reveals from clicking the way button so (isclicked(way-button) === true(#form1-howto))*/
.howto{
background-color: #fbc531;
width: 300px;
height:200px ;
}
#Form1-howto{
position: absolute;
top: 50px;
left: 35px;
padding: 10px;
opacity: 0%;
}
/* the paragraph inside the how to div */
#Form1-howto p {
font-size: 20px;
direction: rtl;
font-size: 25px;
}
/* the title of way div */
#Form1-howto h3,#Form2-howto h3,#Form3-howto h3{
color: #fff;
display: block;
float: right;
padding-left: 100%;
font-size: 40px;
}
/*the how-to div for revealing the equation methode*/
#Form1-howto h4,#Form2-howto h4,#Form3-howto h4{
color: #fff;
display: block;
float: right;
margin-top: 10px;
padding: 10px;
border: 2px solid black;
background-color: white;
color: #000000;
font-size: 16px;
box-shadow: #00000073 2px 3px 3px;
}
/*form1 how-to div end*/
/* form 1 end */
/* form2 start */
/* form2 attributes */
#form2{
margin-top: 10px;
/* border-bottom: 2px solid black; */
direction: rtl;
}
/* input onclick underline animation */
#form2-money:focus ~ #span6,#form2-money-percent:focus ~ #span7 {
width: 100%;
transition: 300ms ;
}
/* the form2 button attributes */
#btn-form2{
padding: 10px;
border: none;
background-color: #fff;
font-size: 18px;
margin-bottom: 25px;
cursor: pointer;
outline: none;
transition: 300ms;
margin-top: 25px;
}
/* hovering on the form2 button */
#btn-form2:hover{
background-color: #e84118;
transition: 300ms;
}
/* the form2 way */
/* a button to reveal the way how the equation methode only for form2 */
#form2-way-button{
padding: 10px;
border: none;
background-color: #fff;
font-size: 18px;
margin-bottom: 25px;
cursor: pointer;
outline: none;
transition: 300ms;
}
/* hoverig on the way button */
#form2-way-button:hover{
background-color: #e84118;
transition: 300ms;
}
/* the how-to div that reveals from clicking the way button so (isclicked(way-button) === true(#form1-howto))*/
/* form2 how-to start */
#Form2-howto{
position: absolute;
top: 580px;
left: 35px;
padding: 10px;
opacity: 0%;
}
/* the paragraph inside the how to div */
#Form2-howto p {
font-size: 20px;
direction: rtl;
font-size: 25px;
}
/*form hown-to end*/
/*the explaining paragraph above titles*/
#form2-p{margin:25px 0px 20px 280px;font-size: 20px; width: 100%;}
/* a border-bottom as a break line */
#form2{border-bottom: 2px solid black;}
/* form2 end*/
/* form3 start */
#form3{
direction: rtl;
}
#form3-p{margin:25px 0px 20px 280px;font-size: 20px; width: 100%;}
#product-price:focus ~ #span8,#discount:focus ~ #span9 {
width: 100%;
transition: 300ms ;
}
/* the form1 button attributes */
#btn-form3{
padding: 10px;
border: none;
background-color: #fff;
font-size: 18px;
margin-bottom: 25px;
cursor: pointer;
outline: none;
transition: 300ms;
margin-top: 25px;
}
/* hovering on the form1 button */
#btn-form3:hover{
background-color: #e84118;
transition: 300ms;
}
/* a button to reveal the way how the equation methode only for form1 */
#form3-way-button{
padding: 10px;
border: none;
background-color: #fff;
font-size: 18px;
margin-bottom: 25px;
cursor: pointer;
outline: none;
transition: 300ms;
}
/* hoverig on the way button */
#form3-way-button:hover{
background-color: #e84118;
transition: 300ms;
}
/* the form3 way */
/*form1 how-to div start*/
/* the how-to div that reveals from clicking the way button so (isclicked(way-button) === true(#form1-howto))*/
.howto{
background-color: #fbc531;
width: 300px;
height:fit-content ;
}
#Form3-howto{
position: absolute;
top: 960px;
left: 35px;
padding: 10px;
opacity: 0%;
}
/* the paragraph inside the how to div */
#Form3-howto p {
font-size: 20px;
direction: rtl;
font-size: 25px;
}
/*form3 how-to div end*/
/* form 3 end */
#designer{
width: 300px;
position: absolute;
top: 50px;
right: 35px;
padding: 10px;
background-color: #f5f6fa;
height: fit-content;
}
#avatar{
width: 100px;
border-radius: 100%;
}
#designer h3 {
color: black;
position: absolute;
top: 45px;
left: 120px;
}
#designer p{
color: black;
position: absolute;
top: 75px;
left: 120px;
}