Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>less-generatorNew to Visual Studio Code? Get it now.
less-generator

less-generator

pipidamowang

|
175 installs
| (0) | Free
quickly generator less file
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

less-generator README

quickly generator less flie

select code -> cmd + g

ezgif.com-gif-maker.gif

Features

According to active text editor selections code to generate the same filename (.less) file on the same folder

0.0.1

Convert a section of HTML code with Class dom node into a Less file

0.0.2

  • [x] Support JSX
  • [x] Can filter the specified Class.(eg. ignore camelCased naming rules, usually developer use it to operate dom and use kebab-case to describe dom style)

0.0.3

Change command title and README.md

0.0.4

Append content instead of replace content when writing less file.

0.0.5

<view class="trade-detail {{detail.isPending? 'fc-pending-border' : '' }} {{detail.isShowDetail ? '' : 'hide'}} hi">
    <view class="foo {style.class} bar"></view>
</view>

or 

<view class="
    trade-detail 
    {{detail.isPending? 'fc-pending-border' : '' }} 
    {{detail.isShowDetail ? '' : 'hide'}}
    hi
    "
>
    <view class="foo {style.class} bar"></view>
</view>

Support like above code, and u will get the follw less file

.trade-detail.hi{.foo.bar{}}

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft