Seeking CSS *hard* reset

14 Dec

Here is a good summary of CSS resets:
http://perishablepress.com/press/2007/10/23/a-killer-collection-of-global-css…
CSS resets typically aim to neutralise styles for each browser (e.g.
setting body padding and margin to zero), force you to “opt in” to
certain features (e.g. setting headings to non-bold), and sometimes
sprinkle in a dash of opionated opionionship (e.g. making HR elements
invisible).

These stylesheets are generally minimal; they assume a lot about
browser defaults. For example, you won’t see “body { background:
white; color: black; }” because every modern browser already defaults
to that.

This usually works fine, but sometimes you want to keep re-applying
different stylesheets dynamically (using a library such as
http://jquery.tiddlywiki.org/twStylesheet.html) and not have each
stylesheet contaminated by any previously applied stylesheet. For
this, you need a hard reset, and I’m not sure any exist. Eric Meyer’s
reset (http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/)
is the closest thing, as it does define black-on-white colours, but it
doesn’t define lots of other things, like font family.

I’m currently looking at them because we (Osmosoft) have been thinking
about how to deploy TiddlyWeb apps, and focusing more on delivering
apps to run as plugins inside a TiddlyWeb-backed TiddlyWiki; as
opposed to running as standalone, plain-old-HTML, REST clients.
Running inside a TiddlyWiki will make deployment easier – we only have
to think about deploying one product: a solid TiddlyWeb-backed
TiddlyWiki which supports some mechanism for the admin to configure
plugins. There’s no “Scrumptious” distro as such; it’s just “install
TiddlyWeb-backed TiddlyWiki (a “one-click” operation); visit the
TiddlyWiki in your browser; and choose “Scrumptious” from the plugin
catalogue”.

The alternative (as I mentioned the other day) is to run these things
inside an iframe, where they will be sandboxed, but I’d rather not as
it would be nicer to have a normal communication channel between the
plugin UI and the rest of TiddlyWiki.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: