(Mirror of http://tikiwiki.org/tiki-index.php?page=RecipeRestoreCss - Should probably be relocated to this site.)
Provide a report on CSS classes used in a stylesheet
Typical Uses
- to identify missing classes when adapting a theme to a newer release of Tiki
- to provide a report prior to merging changes between different themes
- to help with normalising classes across groups of themes
Sources
Copy to clipboard
#!/usr/bin/perl # From the Perl FAQ # written by Jeffrey Friedl and later modified by Fred Curtis $/ = undef; $_ = <>; s#/\*[^*]*\*+([^/*][^*]*\*+)*/|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#\$2#gs; print;
Copy to clipboard
#!/usr/bin/perl $/ = undef; $_ = <>; s#{([^{}]*)}##gs; print;
Copy to clipboard
#!/bin/bash ./stripbraces.pl \$1 \ | ./stripcomments.pl \ | sed -e "s/,[ ]*/\n/g;" \ | sed -e "s/^[ ]*//g;" \ | sed -e "s/[ ]*$//g;" \ | egrep -v "^[ ]*$" \ | sort \ | uniq
Bugs
- properties between braces are often important, but csscheck.sh provides no assistance there
Support Requests
See also
''tw.o credits: Contributors to this page: mdavey .
Page last modified on Monday 28 March, 2005 [20:41:14 UTC] by mdavey.