Eraser.css is a CSS file that uses brute force to reset all critical properties for elements within an embedded widget.
- Uses
!important
to 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-widget
with 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
link
referencing theeraser.css
-based CSS. - Write all your CSS using
!important
for each property.
- Google Chrome
- Mozilla Firefox 3+
- Apple Safari 4+
- Opera 10+
- Internet Explorer 6+
MIT License
Eraser.css incorporates some of the resets found in Cleanslate and Twitter's Embedded Tweets.