parse-interpolation.less 659 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. @inputs: input[type=text], input[type=email], input[type=password], textarea;
  2. @{inputs} {
  3. &:focus {
  4. foo: bar;
  5. }
  6. }
  7. @classes: .a, .b, .c;
  8. @{classes} {
  9. + .z {
  10. color: blue;
  11. }
  12. }
  13. .bar {
  14. .d@{classes}&:hover, baz {
  15. color: blue;
  16. }
  17. }
  18. @c: ~'.a, .b';
  19. @d: ~'.c, .d';
  20. @e: ~' + .e';
  21. @{c}@{d} {
  22. @{e} {
  23. foo: bar;
  24. }
  25. }
  26. @textClasses: ~'&[class="text"], &.text';
  27. input {
  28. @{textClasses} {
  29. background: red;
  30. }
  31. }
  32. @my-selector: ~'.selector-1, .selector-2';
  33. .master-page-1 {
  34. @{my-selector} {
  35. background-color: red;
  36. }
  37. }
  38. @list: apple, satsuma, banana, pear;
  39. @{list} {
  40. .fruit-& {
  41. content: "Just a test.";
  42. }
  43. }