CSS-2 Browser Patch
The CSS-2 Browser Patch makes some advanced CSS-2 features
available in legacy browsers. The current version 0.1,
has only been tested in IE 5+, and will not even try to operate
in other borwsers. The patch is currently 14K uncompressed, but
compresses down to only 5.5K. You can download the patch here.
Features
- Table Support
- Content Insertion
Applying The Patch
To use the patch you merely link in the JavaScript file to every
page within your site. This is easiest done by creating a standard
head section which all pages include on the server side.
Caveats
- this code has not been rigourously tested!
- only works in javascript enabled browsers
- will clash with any other scripts that tries to use
'window.onload', and will need to be hand-modified to share that
event with others
- only simple CSS-1 path selectors are currently supported
- the before and after psuedo classes must be repeated in the
rule body. for example: 'x-position:before'
- style rules placed on elements generated by this script may not
work if those rules do not use 'id' or 'class' based matching
- brittle CSS-2 Selectors, DOM Traversal code, or XPath
statements may not work due to the fact the this script inserts
new elements into the parse tree
- the inline-table statement is currently treated as a regular
table
What Next?
Better support for CSS-2 selectors will be coming shortly;
support for the hover class on non-link elements, and support for
multiple browsers will later follow. It's not very ambitious, but my
own needs will be met with these simple features. If you want
anything else, please let
me know.