Bringing the bear back to form controls with CSS :has() and CSS anchoring 👀
ʕ´•ᴥ•`ʔ
:root:has([type=password]:focus) .paw {
top: anchor(--password, top);
}
Only JavaScript is to toggle the password reveal whose button is anchored to the input 😉
@CodePen link below! 👇
Siendo profe novato de mates, me tocó un grupo de 1º de ESO, el de "los lentos", porque los "buenos alumnos" iban para otros más veteranos. Se me pidió que les adaptara los contenidos a algo que, sinceramente, era muy fácil y aburrido. Pensé que se morirían de asco...