File tree Expand file tree Collapse file tree 1 file changed +4
-17
lines changed
Password-Strength-Checker Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -136,11 +136,7 @@ input[type="password"]::placeholder {
136136}
137137
138138/* Strength levels with solid colors */
139- input : not (: placeholder-shown ): not (: valid ): not (: invalid ) ~ .strength {
140- background : # ffe0e0 ;
141- }
142-
143- input : invalid : not (: placeholder-shown ) ~ .strength {
139+ input : focus : invalid ~ .strength {
144140 background : # fff8e1 ;
145141}
146142
@@ -161,11 +157,7 @@ input:valid ~ .strength {
161157}
162158
163159/* Optional */
164- input : not (: placeholder-shown ): not (: valid ): not (: invalid ) ~ .strength ::after {
165- background : # f57c00 ;
166- }
167-
168- input : invalid : not (: placeholder-shown ) ~ .strength ::after {
160+ input : focus : invalid ~ .strength ::after {
169161 background : # d32f2f ;
170162}
171163
@@ -174,7 +166,7 @@ input:valid ~ .strength::after {
174166}
175167
176168/* Trigger animation when password is being typed */
177- input : not ( : placeholder-shown ) ~ .strength ::after {
169+ input : focus ~ .strength ::after {
178170 transform : scaleX (1 );
179171}
180172
@@ -189,12 +181,7 @@ input:not(:placeholder-shown) ~ .strength::after {
189181 transition : opacity 0.3s ease;
190182}
191183
192- input : not (: placeholder-shown ): not (: valid ): not (: invalid ) ~ .strength-text {
193- opacity : 1 ;
194- color : # d32f2f ;
195- }
196-
197- input : invalid : not (: placeholder-shown ) ~ .strength-text {
184+ input : focus : invalid ~ .strength-text {
198185 opacity : 1 ;
199186 color : # f57c00 ;
200187}
You can’t perform that action at this time.
0 commit comments