Created
April 7, 2017 13:55
-
-
Save lvl99/6570c4f465bb0ea6cc0c5a4221e91b01 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
// Import and apply the Toggleable Mixin Class to a specific class | |
.toggleable { | |
// Imports the mixin and its related mixins and variables | |
.ui-lvl99-toggleable(@ns: ~"toggleable"); | |
// Initialise the default since we have no other modifications from the normal | |
.-toggleable-init-default(); | |
} | |
// Let's do a parametric modification since spans should be displayed using `inline` or `inline-block` | |
span.toggleable { | |
.ui-lvl99-toggleable(@ns: ~"toggleable"; @-toggleable-display: ~"inline-block"); | |
.-toggleable-init-default(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment