sass編譯后的css選擇器性能問題
scss代碼:
header?{ ??padding:?20px; ??h1?{ ????font-size:?24px; ????a?{ ??????text-decoration:?none; ??????&:hover?{ ????????text-decoration:?underline; ????????background:?url(1.png)?0?0?no-repeat; ????????span?{ ??????????color:?@red; ????????} ??????} ????} ??} ??img?{ ????border:?none; ????&.glow?{ ??????border:?@border; ????} ??} }
編譯后的css:
header?{ ????padding:20px; } header?h1?{ ????font-size:24px; } header?h1?a?{ ????text-decoration:none; } header?h1?a:hover?{? ????text-decoration:underline; ????background:?url(1.png)?0?0?no-repeat; } header?h1?a:hover?span?{ ????color:?#f00; } header?img?{ ????border:none; } header?img.glow?{? ????border:solid?1px?#f00; }
sass編譯后的css選擇器層次過多,對瀏覽器渲染速度是不利的,有沒有解決的辦法?