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
| .filter:extend(.btn-group all) {} | |
| button:extend(.btn-default, .btn all) {} | |
| .filter > button:extend(.btn-group > .btn all) {} | |
| // also don't miss that there're a lot of classes like | |
| // .btn-group-xs .btn-xs etc. etc. | |
| // and none of those are considered by above code | |
| // (so you also have to code them explicitly when needed) |
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
| .font-face(@family, @filename: @family) { | |
| // font-family and font file name don't have to be the same but let's keep it simple | |
| font-family: "@{family}"; | |
| @font-face { | |
| font-family: "@{family}"; | |
| @file: "../fonts/@{filename}"; | |
| src: url("@{file}.eot"); |
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
| #np-namespace { | |
| @color: red; | |
| .mixin() { | |
| color: @color; | |
| } | |
| } | |
| #namespace() { | |
| @color: blue; | |
| .np-mixin { |
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
| // Dynamically generated classes as mixins: | |
| .generate-1(@name) { | |
| .@{name} { | |
| color: red; | |
| } | |
| } | |
| .generate-2(@name) { | |
| @{name} { |
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
| .usage { | |
| .absolute(top 123px, left 321px); | |
| .relative(top, left 123px, right 456px); | |
| .fixed(bottom, left); | |
| // or whatever else CSS [property value(s)] pairs (empty value expanded as 0): | |
| .expand-style(padding); | |
| .expand-style(color red, background-color blue, border 1px solid green); | |
| // etc. |
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
| .button-link { | |
| &, &:hover { | |
| color: black; | |
| background: white; | |
| } | |
| } |
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
| .button-link { | |
| .imlazyandherearemycolors(white, black); | |
| } | |
| .not-button-link { | |
| .imlazyandherearemycolors(red, blue); | |
| } | |
| .imlazyandherearemycolors(@fore, @back: (#fff - @fore), @state: ~':hover') { | |
| color: @fore; |
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
| @foobar: #69c; | |
| .z { | |
| @pre: foo; | |
| @post: bar; | |
| @a: "@{pre}@{post}"; | |
| @b: ~"@{@{pre}@{post}}"; | |
| .-() {@c: ~"@{@{pre}@{post}}"} .-; |
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
| .generate-something(4); | |
| .generate-something(@i) when (@i > 0) { | |
| // just invoke next iteration *before* styles | |
| // so the styles output when the loop is unwinded | |
| // and the whole thing works in reverse: | |
| .generate-something((@i - 1)); | |
| .something-@{i} { | |
| left: (@i * 1%); | |
| } |
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
| @font-awesome-icons: | |
| glass "\f000", | |
| music "\f001", | |
| search "\f002", | |
| envelope-o "\f003", | |
| heart "\f004", | |
| star "\f005", | |
| star-o "\f006", | |
| user "\f007", |