mixins-interpolated.less 776 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. 
  2. @a0: 123;
  3. @a1: foo;
  4. @a2: ~".foo";
  5. @a4: ~"#foo";
  6. .@{a0} {
  7. a: 0;
  8. }
  9. .@{a1} {
  10. a: 1;
  11. }
  12. @{a2} {
  13. a: 2;
  14. }
  15. #@{a1} {
  16. a: 3;
  17. }
  18. @{a4} {
  19. a: 4;
  20. }
  21. mi-test-a {
  22. .123;
  23. .foo;
  24. #foo;
  25. }
  26. .b .bb {
  27. &.@{a1}-xxx .yyy-@{a1}@{a4} {
  28. & @{a2}.bbb {
  29. b: 1;
  30. }
  31. }
  32. }
  33. mi-test-b {
  34. .b.bb.foo-xxx.yyy-foo#foo.foo.bbb;
  35. }
  36. @c1: @a1;
  37. @c2: bar;
  38. @c3: baz;
  39. #@{c1}-foo {
  40. > .@{c2} {
  41. .@{c3} {
  42. c: c;
  43. }
  44. }
  45. }
  46. mi-test-c {
  47. &-1 {#foo-foo;}
  48. &-2 {#foo-foo > .bar;}
  49. &-3 {#foo-foo > .bar.baz;}
  50. }
  51. .Person(@name, @gender_) {
  52. .@{name} {
  53. @gender: @gender_;
  54. .sayGender() {
  55. gender: @gender;
  56. }
  57. }
  58. }
  59. mi-test-d {
  60. .Person(person, "Male");
  61. .person.sayGender();
  62. }