Stylesheet Philosophy

120 views
Skip to first unread message

Damon Pritchett

unread,
Sep 27, 2019, 2:33:13 PM9/27/19
to TiddlyWiki
Hello All,

This is a generic question on what might be a best practice. When doing stylesheets to customize your TW, is it better to have all the styles in a single stylesheet or to have several stylesheets based on what is being modified. I currently have a mix of both, but was just wondering what the community does or thinks about this. 

Thanks,

Damon

Damon Pritchett

unread,
Sep 27, 2019, 2:38:20 PM9/27/19
to TiddlyWiki
The reason I'm asking this question is because I'm finding my large stylesheet hard to find things sometimes. I do have some comments, but they only slightly helpful. I'm leaning towards the multiple stylesheets, but thought I'd ask what other folks are doing.

Damon

coda coder

unread,
Sep 27, 2019, 3:04:46 PM9/27/19
to TiddlyWiki
Form the point of view of authoring and maintenance (which is how you're asking), I do both.

I too use comments. For larger-grained tw-elements that need a lot of styling, I'll use dedicated tiddler-stylesheets for those. For "incidentals", (i.e. little nudges) I might add style elements inside a macro that needs them. I try to avoid <div style="...">

For the larger stylesheets, I typically use a sidebar tab dedicated to showing them as a list. Then, "muscle-memory" aids me finding what I'm looking for.

For the smaller guys, I tend to start in the browser tools inspector to remind myself what's going on.

HTH.

TonyM

unread,
Sep 27, 2019, 7:35:09 PM9/27/19
to TiddlyWiki
A Personal, non css expert view.

It may depend on what the css is trying to do. 
  • If its supplementary and introducing new class etc.. I think they could be organised in smaller independent style sheets in logical groupings. 
  • However if the key is to overwrite existing CSS ie leveraging the Cascading nature of CSS bundle them in a smaller number of stylesheets so you can managed where in the cascade they apply see Control Panel > Info > Advanced > Stylesheets where the order can be set with drag and drop.
  • Consider list-before or list-after on your stylesheets to assist here.
Personally although I have not published much to the community yet, beyond support, methods and code fragments in Google Groups. My design practice always takes account of the possibility of publishing plugins or bundles so others can reuse my designs. Keeping this in mind tends to guide how I structure my designs, can it be packaged for reuse in my own wikis, or to be published for use in others wikis. In this case I would select the css design that supports distribution and is careful not to have unintentional side effects.

Regards
Tony

Mohammad

unread,
Sep 27, 2019, 11:36:18 PM9/27/19
to TiddlyWiki
Tiddlywiki philosophy is to use tiddler: the smallest meaningful.


The philosophy of tiddlers is that we maximize the possibilities for re-use by slicing information up into the smallest semantically meaningful units with rich modelling of relationships between them. Then we use aggregation and composition to weave the fragments together to present narrative stories.


So, I absolutely recommend you to go the Tiddlywiki way!
--Mohammad

@TiddlyTweeter

unread,
Sep 28, 2019, 5:17:49 AM9/28/19
to TiddlyWiki
Ciao Damon

Either way could be good. It depends. 

An approach I think that is very good is that found in Thomas Elmiger's BRICKS plugin. 

Thomas broke down the entire base stylesheet for TW into modules to allow easier editing and understanding of it.

It also includes a method to, when you done tweaking, to generate one stylesheet that takes up minimal space possible.

Even if you don't use it, is useful to study to better understand TW CSS.


Best wishes
TT

Damon Pritchett

unread,
Sep 28, 2019, 2:38:55 PM9/28/19
to TiddlyWiki
Thanks to everyone for their responses. As always, this forum is awesome!

Still not sure which way I want to go, but I'll be studying the responses closely.

Damon

@TiddlyTweeter

unread,
Sep 28, 2019, 3:25:15 PM9/28/19
to tiddl...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages