mixins-interpolated.less 773 B

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