我工作的一個代碼庫,其中以前開發者所做的決定感到好奇圍繞打造單一性質是否有清理CSS樣式表的工具?
舉例而言,所有的選擇:
.panel .selected a, a.selected-thumb, .date-picker input[type="submit"], .heading-end a, .errormessage .search-box input[type="submit"],
.search-results .search-box input[type="submit"], .article-box-heading.red, .opinion-heading a,
.no-js .tab > a:hover, .touch .tab > a:hover, .tab > .active,
.box-bottom h5 a, .directory dt a,
.directory dd a:hover, .footer-copy p a
{
color: #fff;
}
樣式表是5000線長。我想分開所有的選擇器,並將它們組合成具有匹配屬性的規則。
這樣的事情是否存在?
使用css預處理器並重寫這段代碼。 – Mardzis 2015-02-24 10:24:24