Can't find an answer? Contact us
Those elements are the css selectors. The ones that aren't checked are not used and won't be present in the new CSS file when you click download. If you want to keep a selector that's unchecked, just click it and it'll be available in the CSS file.
This can happen when our crawler was unable to explore some of your pages. You can enable authenticated crawling to crawl more pages or add a list of pages to explore if you believe they were not discovered. You may also manually mark the selectors you want to keep and then click download.
In order to check if some rules are used in the Javascript scripts, all the Javascript files are fetched. CSS classes and identifiers are searched for by scanning Javascript strings. When a match is found, the rule is marked as used. Some Javascript is also evaluated using the PhantomJS browser. This way we are able to discover DOM elements created by Javascript.
All media queries in your CSS files are included in the exploration and will be optimized. Flexible designs, like bootstrap framework, are supported.
The styles defined in the html style element won't be cleaned. We encourage you to put those styles in separate CSS files if you want to removed the unused rules. However, if you import css files in a style element, they will be cleaned.
We don't explore style elements for a few very good reasons:
We do not explore style attributes. Because the style attribute is applied directly to an HTML element, it is always used and we could never mark it as unused.
Our service cannot install the optimized CSS files for you, and this process will vary between different sites. We're looking to create guides for some of the most common technologies to help our users.
The general process though is to find where your CSS files are located on your server, make a backup of them just in case, then replace them with the files you have downloaded from UnusedCSS.
We currently do not provide a tool to automatically concatenate all CSS files. However simply copying and pasting the content of each CSS file into a single new file should work in most cases. The CSS definition may be sensitive to the order the CSS are included in your HTML and you should follow the same order when concatenating files. More information is a available here: Concatenate multiple CSS files into one.
The results you get using the Chrome tool (or another tool) are different because the techniques used for the clean up are different.
We currently do not have a download all button.
There are multiple options to control the crawling of your site.
Yes you can do that. Once you have an account, you can change the site exploration settings. There's a checkbox if you want to clean just one page.
It is not possible to use our service on intranet websites. The site has to be accessible from the internet.
Our service allows you to provide a username and password. They are inserted in your login form to begin the authenticated exploration. It will enable our crawler to explore pages that require authentication.
The tool will first collect the links available on the first page you provide. Then it will open each of the links it found on the first page before following any additional links. This is formally known as a breadth first search.
The crawler will only explore pages available in links (HREF attribute of A elements) and will not do any HTTP POST requests or submit forms (except for your login form if you have enabled that option). You may however customize the crawling process in the site settings by providing a list of pages to explore.
If you have a special set of CSS files that are just sent when you browse using a mobile device, you may want to customize the crawler user agent. By default the crawler identifies itself as a desktop browser. You can change the user agent to an arbitrary string like "Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_4 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B350 Safari/8536.25".
Yes, our service is compatible with WordPress websites. Some users have reported that deactivating the plugin iThemes Security (formerly Better WP Security) during the exploration process yields better results. You may also want to temporarily deactivate any CSS compression plugins.
To create an account:
We will then crawl your website. Within an hour, you will get an email to say the crawling has finished. Then you will be able to view the clean CSS file.
All payments are processed by our payments provider Braintree (a PayPal company). We accept all major credit cards and debit cards.
A CSS selectors determine which style rules apply to the elements of your html document. For example, in h1 em { color: blue }
, h1 em
is the selector.
There is a great list of example CSS selectors at w3schools.
A CSS rule is a selector and a declaration. The declaration specifies any number of style effects to apply to an element. For example, in i { color: blue; }
, i
is the selector and { color: blue; }
is the declaration.