Skip to content

Instantly share code, notes, and snippets.

@carlos-sanchez
Created November 14, 2013 00:43
Show Gist options
  • Save carlos-sanchez/7459262 to your computer and use it in GitHub Desktop.
Save carlos-sanchez/7459262 to your computer and use it in GitHub Desktop.
Disable Elements. Whenever you want to show something is being disabled simply add the .disabled class (or whatever you’d like to call it). First of all, it will turn its opacity to 0.5, but more importantly, it will disable all pointer events on it (hover, click, etc.). A live example would be to give this class to the submit button of a form a…
.disabled {
pointer-events: none;
opacity: 0.5;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment