I have a use case where I provede html example code with somme specific css code which is bounded to each example only.
I can’t use <style>
within a tiddler as it is not where it may appear. I dn’t want to use the style
attribute because my code rely on css class. So the only way is to write a custom stylesheet in its own tiddler and to tag it accordingly.
But this makes the stylesheet available to every tiddler, which is a recipe for future problems and headache. To mitigate this, I have to complexify the whole things, like putting al my code fragements in a weird-named <div>
and prefix all my css rules accordingly (like div#weirdName span.active { stuff... }
which is polluting my solutions.
Would it not be fine to have a <$stylesheet>
widget instead, to be used like that
<$stylesheet stylesheet="customStyle42">
(all my nice coding here)
</stylesheet>
where “customStyle42” would be a tiddler off css stylesheet type but NOT tagged as such. It would not apply everywhere but only within <$stylesheet>
widget . This is the same idea than the <$include>` widget
for macro defined in tiddler not tagged as macros.