I am writing a reusable .NET / Sitecore control which spits out some HTML elements with certain CSS classes. I'd like to provide a default set of CSS definitions for those classes, but only if nothing else in the page load has done so--this is to allow for default formatting but for this to be overridden outside the control.
You have to look at document.styleSheetsAnswer2:
I do not really understand why you'd only want to supply your defaults when there's nothing else... CSS itself basically words your requirement almost: "Cascading". You just need to make sure that your defaults are defined all the way on top (all the time) and that any custom styling follows afterwards. Especially if you are using CSS classes and your selectors use these classnames (because CSS of course has certain rules where a more specific defined declaration will take prio over a less specific one even when the first came before the latter).