Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SCENARIO 1: ONE FILE
- -----------------------------------
- test.less
- -----------------------------------
- #bundle-name() {
- .mixin-one { background: red; }
- .mixin-two { /* properties and values */ }
- }
- .some-class {
- #bundle-name > .mixin-one
- }
- -----------------------------------
- OUTPUT:
- .some-class {
- background: red;
- }
- SCENARIO 2: IMPORT FROM FILE
- -----------------------------------
- test.less
- -----------------------------------
- #bundle-name() {
- import: "import.less";
- }
- .some-class {
- #bundle-name > .mixin-one
- }
- -----------------------------------
- import.less
- -----------------------------------
- .mixin-one { background: red; }
- .mixin-two { /* properties and values */ }
- -----------------------------------
- OUTPUT:
- dmeer@Bad-Robot ~ $ lessc test.less
- NameError: #bundle-name > .mixin-one is undefined in /Users/dmeer/test.less:6:1
- 5 .some-class {
- 6 #bundle-name > .mixin-one
- 7 }
- SCENARIO 2: IMPORT FROM FILE WITH EXTERNAL BUNDLE
- -----------------------------------
- test.less
- -----------------------------------
- import: "import.less";
- .some-class {
- #bundle-name > .mixin-one
- }
- -----------------------------------
- import.less
- -----------------------------------
- #bundle-name() {
- .mixin-one { background: red; }
- .mixin-two { /* properties and values */ }
- }
- -----------------------------------
- OUTPUT:
- dmeer@Bad-Robot ~ $ lessc test.less
- NameError: #bundle-name > .mixin-one is undefined in /Users/dmeer/test.less:4:1
- 3 .some-class {
- 4 #bundle-name > .mixin-one
- 5 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement