strings.less 1012 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #strings {
  2. background-image: url("http://son-of-a-banana.com");
  3. quotes: "~" "~";
  4. content: "#*%:&^,)!.(~*})";
  5. empty: "";
  6. brackets: "{" "}";
  7. escapes: "\"hello\" \\world";
  8. escapes2: "\"llo";
  9. }
  10. #comments {
  11. content: "/* hello */ // not-so-secret";
  12. }
  13. #single-quote {
  14. quotes: "'" "'";
  15. content: '""#!&""';
  16. empty: '';
  17. semi-colon: ';';
  18. }
  19. #escaped {
  20. filter: ~"DX.Transform.MS.BS.filter(opacity=50)";
  21. }
  22. #one-line { image: url(http://tooks.com) }
  23. #crazy { image: url(http://), "}", url("http://}") }
  24. #interpolation {
  25. @var: '/dev';
  26. url: "http://lesscss.org@{var}/image.jpg";
  27. @var2: 256;
  28. url2: "http://lesscss.org/image-@{var2}.jpg";
  29. @var3: #456;
  30. url3: "http://lesscss.org@{var3}";
  31. @var4: hello;
  32. url4: "http://lesscss.org/@{var4}";
  33. @var5: 54.4px;
  34. url5: "http://lesscss.org/@{var5}";
  35. }
  36. // multiple calls with string interpolation
  37. .mix-mul (@a: green) {
  38. color: ~"@{a}";
  39. }
  40. .mix-mul-class {
  41. .mix-mul(blue);
  42. .mix-mul(red);
  43. .mix-mul(black);
  44. .mix-mul(orange);
  45. }