Web Essentials: Remove unused CSS

preview_player
Показать описание
A preview of how we can easily identify and remove dead CSS code in our web projects
Рекомендации по теме
Комментарии
Автор

Looks good for a couple of pages, but looks very cumbersome for larger sites. Removing the CSS thinking that it doesn't apply in a single situation, only to find out in other situations it is required requires you to manually figure everythign out.

basdfgwe
Автор

This works in all browsers. Web Essentials just listens to any changes to the CssRules collection

MadsKristensen
Автор

what if I want to remove all unused CSS at once, what should I do?
It's really harsh to check them out by on by .

amirkian
Автор

AWESOME!!! When is it getting in our hands? Will it be shipped with VS 2013 RTM?

lenielmac
Автор

*jawdrop* didn't see the Firebug stuff coming, thought I know all the usecases for browserlink by now. Very very interesting.. so is this Firebug-specific code via browserextension, or is this just the way you "listen" to CSS events in the page (are there any?)

okh
Автор

Hi, no unsused css is shown inside error list window.
Using MS VS 2013 version 12.0.31101.00 Update 4 & Web Essentials 2013 2.5.3
This is my Web.config file :
<configuration>
    <system.web>
      <compilation debug="true" strict="false" explicit="true" targetFramework="4.5" />
      <httpRuntime targetFramework="4.5" />
    </system.web>

  <system.webServer>
    <handlers>
      <add name="Browser Link for HTML" path="*.html" verb="*"
           type="System.Web.StaticFileHandler, System.Web, Version=4.0.0.0, Culture=neutral,
           resourceType="File" preCondition="integratedMode" />
    </handlers>
  </system.webServer>
</configuration>
What I'm I missing ? Cheers

jacklinkers
Автор

Hello Mads and thanks for the Tuto. Is there a way to remove ALL unused css in one shot ? (i.e. if there is a lot of unused css).

sasesur
Автор

The plan is to ship this at the same time as VS2013 RTM

MadsKristensen