Skip to content

Instantly share code, notes, and snippets.

@averyvery
Created March 21, 2012 15:49
Show Gist options
  • Select an option

  • Save averyvery/2148804 to your computer and use it in GitHub Desktop.

Select an option

Save averyvery/2148804 to your computer and use it in GitHub Desktop.
Simple "todo" style
.TODO {
position: relative;
&:after {
background: rgb(250, 255, 185);
content: "";
display: block;
height: 23px;
left: 5px;
position: absolute;
top: 5px;
width: 141px;
visibility: visible;
z-index: 9998;
}
&:before {
background: rgba(250, 255, 185, 0.3);
bottom: 0;
content: "TODO (esc to hide)";
color: #222;
display: block;
font-size: 14px;
font-weight: bold;
left: 0;
padding: 10px;
position: absolute;
right: 0;
text-align: left;
top: 0;
z-index: 9999;
}
}
var $todos = $('.TODO');
$(window).on('keydown', function(event){
event.keyCode === 27 && $todos.toggleClass('TODO');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment