Eraser.css is a CSS bulldozer reference file that uses brute force to reset all critical properties for elements within an embedded widget.
- Uses
!importantto override any styles cascading down the document from other sources.
- It is best to use the file as a customisable starting point.
- Replace references to
.x-widgetwith the name of your widget. - Since browsers parse CSS selectors from right to left, you may want to customise the selectors in the main reset rule to rely on classes that your widget uses.
- Have your widget insert a
linkreferencing theeraser.css-based CSS. - Write all your CSS using
!importantfor each property.
- Google Chrome
- Mozilla Firefox 3+
- Apple Safari 4+
- Opera 10+
- Internet Explorer 6+
Public domain
Eraser.css incorporates some of the resets found in Cleanslate and Twitter's Embedded Tweets.