Loading...
 
Skip to main content
Provide a report on CSS classes used in a stylesheet
(Cached) Web Design »  CSS »  Tiki CSS

RecipeRestoreCss

(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

bin/stripcomments.pl
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;

bin/stripbraces.pl
Copy to clipboard
#!/usr/bin/perl $/ = undef; $_ = <>; s#{([^{}]*)}##gs; print;

bin/csscheck.sh
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

TikiTeam


''tw.o credits: Contributors to this page: mdavey .
Page last modified on Monday 28 March, 2005 [20:41:14 UTC] by mdavey.


Page last modified on Friday 17 of February, 2006 07:41:25 GMT-0000
Category: Tiki CSS