forked from Codipk/Password-Generator
-
Notifications
You must be signed in to change notification settings - Fork 10
/
style.css
313 lines (285 loc) · 6.26 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
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
305
306
307
308
309
310
311
312
313
*,
*::before,
*::after {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'League Spartan', sans-serif;
}
:root {
--dk-violet: hsl(249, 72%, 11%);
--lt-violet: hsl(297, 63%, 71%);
--lt-violet2: hsla(300, 89%, 26%, 0.322);
--vb-violet: hsl(303, 77%, 21%);
--vb-violet2: hsl(290, 70%, 36%);
--vb-yellow: hsla(98, 100%, 50%, 0.957);
--pl-white: hsla(0, 0%, 100%, 0.854);
--vb-cyan: hsl(72, 100%, 51%);
--vb-cyan2: hsl(177, 92%, 70%);
--dk-text: hsl(198, 20%, 13%);
}
body.dark-mode {
background: linear-gradient(231deg, rgba(22, 6, 40, 1) 0%, rgb(35, 3, 72) 50%, rgba(88, 7, 125, 1) 100%);
color: var(--pl-white);
}
input[data-passwordDisplay]::placeholder {
color: var(--placeholder-color); /* Use the CSS variable set in JavaScript */
}
#mode-toggle {
position:absolute;
top:20px;
right:20px;
background:transparent;
border:none;
outline:none;
cursor:pointer;
z-index:1000;
}
body {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
h1 {
color: rgb(172, 199, 241);
opacity: 0.75;
text-transform: uppercase;
letter-spacing: 2px;
text-align: center;
line-height: 1.2;
}
.display-container {
position: relative;
background-color: var(--dk-violet);
border-radius: 1rem;
border-bottom: 0.35rem solid var(--lt-violet2);
margin: 1rem 0;
padding-top: 0.35rem;
}
.display {
width: 100%;
background-color: transparent;
padding: 1.15rem 1rem;
color: var(--vb-yellow);
font-weight: 600;
font-size: 1.5rem;
line-height: 30px;
letter-spacing: 1px;
padding-right: 3.25rem;
border:none;
}
.display::placeholder {
position:absolute;
top: 50%;
left: 1.5rem;
font-size: 1.5rem;
line-height:30px;
color:var(--vb-yellow);
opacity: 0.65;
text-transform: uppercase;
transform: translateY(-50%);
}
.display-container button {
position:absolute;
top:50%;
right:1.5rem;
transform: translateY(-50%);
}
.input-container{
width:100%;
background-color: var(--dk-violet);
border-radius: 1rem;
padding: 2rem;
border-bottom: 0.35rem solid var(--lt-violet2);
}
.length-container {
display: flex;
justify-content: space-evenly ;
align-items: center;
}
.length-container p:nth-child(1) {
color:whitesmoke;
font-size: 1.5rem;
}
.length-container p:nth-child(2) {
color:yellowgreen;
font-size: 1.5rem;
}
.strength-container {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 1.75rem;
margin-bottom: 2rem;
}
.strength-container p{
color:rgb(180, 203, 3);
font-size: 1.5rem;
}
.indicator {
width:1.5rem;
height:1.5rem;
border-radius:50%;
}
.generateButton {
width: 100%;
padding: 1rem 0;
background-color: blanchedalmond;
text-align: center;
border-radius: 0.75rem;
border-bottom: 0.35rem blue;
text-transform: uppercase;
letter-spacing: 1px;
color: darkred;
font-weight: 600;
font-size: 1.25rem;
}
.check {
display: flex;
align-items: center;
margin: 1rem 0;
gap: 0 1rem;
}
.check input{
appearance: none;
width: 20px;
height: 20px;
border: 1px solid var(--vb-cyan);
cursor: pointer;
position: relative;
border-radius: 0.35rem;
}
.check input:checked::before {
content: '✔';
position: absolute;
color: var(--dk-text);
font-size:1.05rem;
font-weight: 600;
left:50%;
top:-9.5px;
transform: translateX(-50%) translateY(40%);
}
.checkbox-icon{
display: none;
}
.check label {
color: var(--pl-white);
font-size: 1.25rem;
letter-spacing: 0.75px;
}
.copyBtn{
background-color: transparent;
border:none;
outline:none;
}
#tooltip {
position: absolute;
background-color: var(--vb-violet2);
color: var(--vb-yellow);
font-size: 1.25rem;
top: -35px;
left: -25px;
padding: 5px 10px;
border-radius: 1rem;
opacity: 0;
transform: scale(0);
transform-origin: bottom;
transition: all 250ms ease-in-out;
}
#tooltip.active {
opacity: 1;
transform: scale(1);
}
.slider{
appearance: none;
width:100%;
height: 0.75rem;
cursor: pointer;
background-color: var(--lt-violet);
border-radius: 1rem;
margin-top: 2rem;
margin-bottom: 1.5rem;
background-image: linear-gradient(var(--vb-violet), var(--vb-violet));
background-repeat: no-repeat;
border:none;
outline:none;
z-index:-1;
}
.slider::-webkit-slider-thumb {
position:relative;
z-index:1;
appearance: none;
height:2rem;
width:2rem;
border-radius: 50%;
background-color: var(--vb-yellow);
cursor:pointer;
margin-top: -3px;
box-shadow: 0px 0px 20px 0px rgba(238, 218, 91, 0.89);
transition: all 100ms ease-in;
}
.slider:focus{
outline: 3px solid var(--vb-yellow);
}
.slider::-webkit-slider-thumb:hover{
outline: 2px solid var(--vb-yellow);
background-color: var(--dk-violet);
box-shadow: 0px 0px 25px 5px rgba(255, 229, 61, 0.80);
}
.strength-bar-box{
padding: 2px;
width:70%;
border: 2px solid gray;
border-radius: 20px;
}
.strength-bar{
height: 20px;
width: 20%;
border-radius: 20px;
background-color: red;
}
.copyBtn {
position: relative;
background: none;
border: none;
cursor: pointer;
padding: 10px;
transition: transform 0.2s ease; /* Smooth click effect */
}
.copyBtn:active {
transform: scale(0.95); /* Adds a click effect */
}
.icon {
transition: all 0.3s ease; /* Smooth transition for icon change */
width: 23px;
height: 23px;
}
.success {
filter: hue-rotate(100deg); /* For green success checkmark */
}
.tooltip {
position: absolute;
top: -30px;
left: 50%;
transform: translateX(-50%);
background-color: #333;
color: #fff;
padding: 5px;
border-radius: 4px;
font-size: 12px;
display: none;
}
.copyMsg {
display: none;
}
.active {
display: block; /* Show the message when active */
background-color: #fff;
color: black;
font-size: medium;
transition: opacity 0.5s; /* Optional: Add a fade effect */
opacity: 1; /* Ensure it is fully visible */
}