Created
April 7, 2017 13:56
-
-
Save lvl99/b0e1caf7a1731b1c0ddfad9d4efbc157 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
This file contains 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
// Modal component | |
.modal { | |
.ui-lvl99-toggleable(@ns: ~“modal”); | |
.-toggleable-init-default(); | |
} | |
// ... would generate the following CSS | |
.modal.ui-modal-show { | |
display: block; | |
} | |
.modal.ui-modal-hide { | |
display: none; | |
} | |
// Spinner component (could be used inline with text or in a button) | |
.spinner { | |
.ui-lvl99-toggleable(@ns: ~“spinner”; @-toggleable-display: ~”block”); | |
.-toggleable-init-default(); | |
} | |
// ... would generate the following CSS | |
.spinner.ui-spinner-show { | |
display: inline-block; | |
} | |
.spinner.ui-spinner-hide { | |
display: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment