Articles Tagged with “Css-compile”
22/01/2008: CSS to HTML Compiler
I’ve searched around the ‘Net for something like this before, but without success, so decided to write my own. The basic idea is this: there are certain circumstances in which you need to write some styled HTML without access to the document’s header. For example, when composing HTML-formatted e-mails, which may be displayed in a web-based e-mail client; when adding content to limited content-management system; or in an eBay auction description. In such a situation, you can’t (validly) include a <link rel="stylesheet"> element, nor a block (if you do include such a construct it may just about work, but the document will not be valid), so instead you are reduced to using HTML style attributes all over the place.
However, it is slow work using style attributes as you can’t take advantage of CSS selectors. Instead…