I designed a button for a website and tried to add transform: scale(0.95); on a click event (using the :activate CSS selector).
a.btn, input[type="submit"].btn, label.btn, button.btn {
text-transform: uppercase;
border: solid 1px #282828;
font-size: 11px;
line-height: 17px;
}
a.btn:active, input[type="submit"].btn:active, label.btn:active, button.btn:active {
transform: scale(0.95);
}
<input type="submit" value="Show more recipes" class="btn"/>
If the user clicks on the border of the button, the :active state reduces the icon and the cursor no longer covers the button, and probably no longer triggers the click event. If the user clicks inside the scale(0.95) area, the click event is triggered as normal.
I am trying to keep the click event; I tried to apply an invisible :before panel with no success, since input[type='submit'] does not support it, and was hoping someone solved this issue already.
Edit Jan 14th: Issue has been rewritten now using input[type='submit'] which cannot contain elements.
