Skip to content

Latest commit

 

History

History
25 lines (22 loc) · 462 Bytes

shorten-class.md

File metadata and controls

25 lines (22 loc) · 462 Bytes

shorten-class

  • Default configuration:
{
	"rules": {
		"shorten-class": true
	}
}
  • Explanation:
    • Shorten className
    • Remove unreferenced className

E.g:

<style>.red_rect {fill: red;}</style>
<rect class="red_rect blue_rect" width="100" height="100"/>

After optimization will become (.red_rect is shortened to .a, .blue_rect is removed directly):

<style>.a {fill: red;}</style>
<rect class="a" width="100" height="100"/>