interpolation.less 567 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. @cool-hello: "yes";
  2. @cool-yes: "okay";
  3. @var: "hello";
  4. div {
  5. interp1: ~"@{cool-hello}";
  6. interp2: ~"@{cool-@{var}}";
  7. interp3: ~"@{cool-@{cool-@{var}}}";
  8. }
  9. // interpolation in selectors
  10. @hello: 10;
  11. @world: "yeah";
  12. @{hello}@{world} {
  13. color: blue;
  14. }
  15. @{hello} {
  16. color: blue;
  17. }
  18. hello world @{hello} {
  19. color: red;
  20. }
  21. #@{world} {
  22. color: "hello @{hello}";
  23. }
  24. @num: 3;
  25. [prop],
  26. [prop="value@{num}"],
  27. [prop*="val@{num}"],
  28. [|prop~="val@{num}"],
  29. [*|prop$="val@{num}"],
  30. [ns|prop^="val@{num}"],
  31. [@{num}^="val@{num}"],
  32. [@{num}=@{num}],
  33. [@{num}] {
  34. attributes: yes;
  35. }