Created
January 15, 2013 17:56
-
-
Save stefl/4540506 to your computer and use it in GitHub Desktop.
Contenteditable hover and focus states
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[contenteditable]:hover:after { | |
content: ' click to edit'; | |
font-style: italic; | |
font-size: 12px; | |
color: #ccc; | |
} | |
[contenteditable]:hover, [contenteditable]:focus { | |
background: #FFFFD3; | |
} | |
[contenteditable]:focus { | |
padding: 5px; | |
} | |
[contenteditable]:focus:after { | |
content: ''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment