Skip to content

A vscode plug-in for parsing the selected HTML and copying the generated CSS class tree to the clipboard, eliminating the trouble of writing CSS classes manually

License

Notifications You must be signed in to change notification settings

liuxueyong123/html2cssTree

Repository files navigation

中文 | English

html2csstree

Build Status Build Status

一款 vscode 插件,用于对选中的 html 进行语法解析,将生成的 css class 树复制到剪贴板,省去手动写 css class 的困扰

下载

已经上架:marketplace.visualstudio.com

或者在 vscode 扩展中直接搜索 html2csstree 安装即可

快捷键

mac: command + 2

windows: ctrl + 2

如有冲突,用户可自定义快捷键

功能

选中需要解析的一段 html 后,按下快捷键(或右键菜单选择html2css)即可将生成的 css tree 复制到剪贴板以供使用

例:

<div class="parent">
  <div class="child-1">
    <div class="child-child-1"></div>
    <div class="child-child-2"></div>
  </div>
  <div class="child-2"></div>
</div>

结果:

.parent {
  .child-1 {
    .child-child-1 {}
    .child-child-2 {}
  }
  .child-2 {}
}

License

MIT © Richard McRichface

TODO List

About

A vscode plug-in for parsing the selected HTML and copying the generated CSS class tree to the clipboard, eliminating the trouble of writing CSS classes manually

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published