Apologies for the download link being broken for a while. For some reason, anything with a .pl suffix doesn’t work at my new hosting provider. Fixed now.
There are several major changes since the last release.
A new option
--regex allows you to search for selectors or properties using Perl regular expression syntax.
Meanwhile the mechanism used by the default search method (when neither
--exact is specified) is now more precisely specified. It differs according to whether you’re searching for selectors or properties, so that most of the time it should just Do The Right Thing.
cssmerge --selector a will return all codeblocks relating to the element <a> (including
li ul a.foo,
a:hover etc), but not the element <abbr> nor any class
.a or ID
#a. To search for classes, ID or pseudos, simply include the appropriate sigil in your search, ie
--selector :hover. Note the quotes in the second example there; some shells will otherwise ignore anything following a hash sign.
cssmerge --property font will search not just for the
font property but also
font-size etc… which is almost certainly what you want. If it isn’t, of course, you can use
There is also support for escaped characters in identifiers, per the CSS 2.1 spec.
Your feedback is always welcome. Please feel free to add a comment to this post, or send email to the address on the About page.