Answer the question
In order to leave comments, you need to log in
Less CSS is a framework for css. Question about lines?
Perhaps the solution is obvious, but I just don't see it?
Here is a description of the language: lesscss.ru/
I'll
ask for a little fresh look at the question:
How can I join two strings without a space?
Documentation example:
@var1: 1;
@var2: 2;
@var3: @var1 @var2;
As a result, @var3 will be equal to "1 2".
Any combination of brackets, quotes, and the output function without processing e("some text"); do not give a result.
Tested variants:
@var3: @var1 @var2; // output: "1 2"
@var3: @var1()@var2; // error
@var3: ((@var1)(@var2)); // error
@var3: ( ( @var1 ) ( @var2 ) ); // "1 2"
@var3: e("") @var1 e("") @var2 e(""); // " 12 "
@var3: "@var1 @var2"; // "@var1 @var2"
@var3: '@var1 @var2'; // "@var1 @var2"
Use cases: (in case anyone wonders why?)
1) changing the type, eg 1px -> 1%
2) creating links, eg: @root/@file-name
P.S. any options and theories are allowed. Perhaps your answer will give me the right idea.
Answer the question
In order to leave comments, you need to log in
The answer is found in the questions on the github .
The solution is to use the "%();" output function, and looks something like this:
@url-root: "sub.site.zone/folder/";
@url-my: "images/arrow.png";
@url-full: e(%("url(http://%s%s)", @url-root, @url-my));
There is a second way if you need to use JavaScript inside:
Compile to:
@str: "hello";
@var: ~`"@{str}".toUpperCase() + '!'`;
@var: HELLO!;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question