CSS fun: labels that change colour when their input is focused

This is the sort of UX that should be easy to do, but is not. CSS pseudos allow us to style different form input states, like input:focus. This is fine but ever wanted to also highlight the label element for that input? You just can’t do it. Typical markup is: <label for=”email”>LOGIN</label> <input required type=”email” name=”email” id=”email” class=”dark-input” /> CSS3… Read more →