Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Commit

Permalink
Use caution when using javascript in less
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeapage committed Oct 21, 2012
1 parent c409bf6 commit 476c709
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion templates/pages/doc.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -582,7 +582,10 @@ This is called an "escaped value", which will result in:
JavaScript evaluation JavaScript evaluation
--------------------- ---------------------


JavaScript expressions can be evaluated as values inside .less files. This is done by wrapping the expression JavaScript expressions can be evaluated as values inside .less files. We reccomend using caution with this feature
as the less will not be compilable by ports and it makes the less harder to mantain. If possible, try to think of a
function that can be added to achieve the same purpose and ask for it on github. We have plans to allow expanding the
default functions available. However, if you still want to use JavaScript in .less, this is done by wrapping the expression
with back-ticks: with back-ticks:


@var: `"hello".toUpperCase() + '!'`; @var: `"hello".toUpperCase() + '!'`;
Expand Down

0 comments on commit 476c709

Please sign in to comment.