Extracting selectors from HTML / JSX / TSX and generate CSS file.
hudochenkov/ecsstractor of VS Code version.
Open any HTML file and do the following:
- Open the command palette
- Press
Cmd + Shift + P
on macOS orCtrl + Shift + P
on Windows / Linux - Go to
View
→Command Palette
- Press
- Typing the
Run: eCSStractor
and select
Then will see new tab with CSS selectors extracted from HTML file.
Source:
<ul id="test-list" class="list">
<li class="list-item">Test 1</li>
<li class="list-item">Test 2</li>
<li class="list-item">Test 3</li>
<li class="list-item">Test 4</li>
<li class="list-item">Test 5</li>
</ul>
Run eCSStractor:
#test-list {
}
.list {
}
.list-item {
}
In VS Code window:
- Open the extensions
- Press
Cmd + Shift + P
on macOS orCtrl + Shift + P
on Windows / Linux - Go to
View
→Extensions
- Press
- Typing the
ecsstractor
in input form and selectInstall
oneCSStractor