Closed cipchk closed 4 years ago
Let's say I have the following map and iterate over it with the each-function:
@values: 9, 12, 24; each(@values, { /** * Font size, same: @{value} */ .font-size-@{value} { font-size: ~"@{value}px"; } });
Output:
/** * Font size, same: @{value} */ .font-size-9 { font-size: 9px; } /** * Font size, same: @{value} */ .font-size-12 { font-size: 12px; } /** * Font size, same: @{value} */ .font-size-24 { font-size: 24px; }
How to fill variables in comments, like this:
/** * Font size, same: 9 */ .font-size-9 { font-size: 9px; } /** * Font size, same: 12 */ .font-size-12 { font-size: 12px; } /** * Font size, same: 24 */ .font-size-24 { font-size: 24px; }
I hope to get comments by parsing css (like css-tree) for ide intellisense.
css-tree
The appropriate place to ask this is Stack Overflow, but the quick answer is:
@var: 9; e("/** * Font size, same: @{var} */");
Let's say I have the following map and iterate over it with the each-function:
Output:
How to fill variables in comments, like this:
I hope to get comments by parsing css (like
css-tree
) for ide intellisense.