Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2013
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. SCENARIO 1: ONE FILE
  2. -----------------------------------
  3. test.less
  4. -----------------------------------
  5. #bundle-name() {
  6. .mixin-one { background: red; }
  7. .mixin-two { /* properties and values */ }
  8. }
  9.  
  10. .some-class {
  11. #bundle-name > .mixin-one
  12. }
  13. -----------------------------------
  14. OUTPUT:
  15. .some-class {
  16. background: red;
  17. }
  18.  
  19.  
  20. SCENARIO 2: IMPORT FROM FILE
  21. -----------------------------------
  22. test.less
  23. -----------------------------------
  24. #bundle-name() {
  25. import: "import.less";
  26. }
  27.  
  28. .some-class {
  29. #bundle-name > .mixin-one
  30. }
  31. -----------------------------------
  32. import.less
  33. -----------------------------------
  34. .mixin-one { background: red; }
  35. .mixin-two { /* properties and values */ }
  36. -----------------------------------
  37. OUTPUT:
  38. dmeer@Bad-Robot ~ $ lessc test.less
  39. NameError: #bundle-name > .mixin-one is undefined in /Users/dmeer/test.less:6:1
  40. 5 .some-class {
  41. 6 #bundle-name > .mixin-one
  42. 7 }
  43.  
  44.  
  45. SCENARIO 2: IMPORT FROM FILE WITH EXTERNAL BUNDLE
  46. -----------------------------------
  47. test.less
  48. -----------------------------------
  49. import: "import.less";
  50.  
  51. .some-class {
  52. #bundle-name > .mixin-one
  53. }
  54. -----------------------------------
  55. import.less
  56. -----------------------------------
  57. #bundle-name() {
  58. .mixin-one { background: red; }
  59. .mixin-two { /* properties and values */ }
  60. }
  61. -----------------------------------
  62. OUTPUT:
  63. dmeer@Bad-Robot ~ $ lessc test.less
  64. NameError: #bundle-name > .mixin-one is undefined in /Users/dmeer/test.less:4:1
  65. 3 .some-class {
  66. 4 #bundle-name > .mixin-one
  67. 5 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement