Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lvl99/25adbdb9d225581ccaa6a772a0ecc551 to your computer and use it in GitHub Desktop.
Save lvl99/25adbdb9d225581ccaa6a772a0ecc551 to your computer and use it in GitHub Desktop.
Object-oriented inspired composable LESS mixins. View the article on the blog: http://blog.lvl99.com
.modal {
.ui-lvl99-modal(@ns: ‘modal’);
.-modal-init-default({
background: red;
padding: 40px;
});
}
// ... would output the following CSS
.modal {
display: none;
overflow: hidden;
height: 0;
position: fixed;
left: 0;
top: 0;
width: 100%;
pointer-events: none;
background: red;
padding: 40px;
}
.modal.ui-modal-show {
display: block;
overflow: auto;
height: 100%;
pointer-events: auto;
}
.modal.ui-modal-hide {
display: none;
overflow: hidden;
height: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment