This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Tool to identify unused css definitions
I have quite big CSS file, that already contains style definition for classes/elements that are not used by markup any more.
It is possible to find those quick?
You can use the Firefox extension Dust-Me at http://www.sitepoint.com/dustmeselectors/.
you can get the Dust-Me Selectors plug in for Firefox to test pages individually or spider a whole site.
Related
This question already has answers here:
How to disable CSS in Browser for testing purposes
(19 answers)
Closed 7 months ago.
I am looking for an option based solution.
Of course there is an option to remove all style tags one by one from the elements panel, this will not remove inline injected styles.
For debugging purposes I would like this option to be at reach, I remember this being an option at one time.
For debugging you could try commenting out link tag in html body that has link to CSS stylesheet
You can do that on Firefox, found in the menu under View -> Website Style -> No Style (the wording might be slightly different, I don't have english version of FF installed but you should find it rather easily I guess.
This question already has answers here:
Change indentation in Sass
(3 answers)
Closed 7 years ago.
Is there a way to have sass output with tabs instead of spaces?
I know there is the classic argument of spaces but I have a requirement that all my css needs to be indented with tabs before checked in to source control.
Any ideas?
As mentioned by manishie (and his link), there's not built-in way to change how the outputted CSS is indented. The only way is to run it through a separate tool (like Grunt) to "correct" the indentation as you see fit.
This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
Tool for checking unused CSS selectors?
I am working on a big project that was work on many people before me and now the CSS file is very big more than 4000 line there is many unused css rules i was trying firebug plugin CSS usage but i have to check page by page and compare what use here and not used there while its only one big CSS file is there any web site that can help me find unused CSS rules much better
In the chrome console you have the "Audits" tab. There you click in "Run" and shows you a result with unused rules.
http://code.google.com/intl/es/speed/page-speed/download.html this is a plugin for firefox and chrome
EDIT:
Here you have two tools to minimize css
http://tools.w3clubs.com/cssmin/
http://www.cleancss.com/
This question already has answers here:
Detecting IE version using CSS Capability/Feature Detection
(18 answers)
Closed 5 months ago.
input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}
input,textarea,select{*font-size:100%;}
This is from the YUI reset css. What does the * before font-size:100% do?
This is an IE hack. The second line is only correctly parsed and executed by IE 7 and below. See http://www.webdevout.net/css-hacks#unrecommended-asterisk_prefix for more information.
Edit: One remark on using such (invalid!) CSS: please don't. There are plenty of ways of keeping your CSS clean of such mess. You'll never know what behavior IE9 might bring. Better to put these kind of hacks in a separate CSS file which can then be included through conditional comments.
To be more precise: IE6/7 doesn't support font-size: inherit. This hack is supposed to achieve the goal anyway.
I think it's a hack to make that definition only apply to IE 7 or less while being ignored by other browser as an asterisk is not a legal character before an attribute name.
As already told, those are hack to target specific browsers. Marc's suggestion is quiet right, and here's a link to give you an kick start:
http://www.webdevout.net/css-hacks
This question already has answers here:
How to identify unused CSS definitions from multiple CSS files in a project
(3 answers)
Closed 1 year ago.
Before publishing a site I have bloat of unused CSS styles. Is there any good tool to detect unused CSS classes, divs?
Related Questions:
Tool to identify unused css definitions
Are there any utilites that will help me refactor CSS
Here is a simple web based css optimizer, very useful:
http://www.cleancss.com/
Try ProCSSor
Make sure you have firebug (for Firefox, if you don't know), and then install the pagespeed plugin for firebug, developed by Google:
http://code.google.com/speed/page-speed/
It will give you a 'pageSpeed' tab in firebug. Open it and, with 'performance' selected, click 'analyze performance'. Along with lots of other useful suggestions, you will get a list item labelled "Remove Unused Css". Click to expand it and see a breakdown by resource of unused css rules appearing on the present page, along with the memory size that you will save by removing the unused rules.
You can try CSS Tidy:
http://csstidy.sourceforge.net/
It is simple yet effective.