DEV Community

Discussion on: Possibly the Most Useful CSS Trick

Collapse
 
jlizanab profile image
José Lizana

//you can also simulate a disabled button

button {
background-color: blue;
color:white;
opacity:.5;
pointer-events:none;
}

input:not(:placeholder-shown) + button {
opacity:1;
pointer-events: all;
}