Replies: 4 comments 2 replies
-
Hi @twMat
I'm not sure I follow – surely there's one click access to all the stylesheets in control panel under Advanced -> Stylesheets? I think the main advantage of the arrangement you describe is that it combines stylesheets with the tiddler to which they apply. But that's really only a help if there is a precise 1:1 relationship between styles and tiddlers, and breaks down if want wants styles that are shared between tiddlers. |
Beta Was this translation helpful? Give feedback.
-
OK, I made following to show the concept: https://stylefields.tiddlyhost.com/ It also invites for specialized stylesheets e.g a stylesheet dedicated to buttons, another for tables, etc (exemplified with a stylesheet I stole from @kookma ). I'm a proponent of direct access to things as one needs them and believe a "in-tiddler UI" should substantially simplify use of styles. Any thoughts are welcome. |
Beta Was this translation helpful? Give feedback.
-
Hi Mat, I like to whole idea! and it facilitate using css easier!
Sidenote: One problem with TW is I created a test tiddler with stylefield as below and it worked
Inside the test tiddler I had
|
Beta Was this translation helpful? Give feedback.
-
Since this is a discussion (as opposed to e.g an Issue) I encourage anyone to come with ideas for how TW could make it easier to access and use the native stylesheets and CSS in general. I suspect many just skip fooling around with CSS because e.g "the default buttons are still buttons"... but c'mon we can do better than that! Also, I have found that a LOT can actually be created using CSS. One cool aspect is that it is browser native so it also works in static tiddlers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Wouldn't this approach to stylesheets be superior to the monoliths we have now?
The stylesheet tiddlers really show a generated list of transclusions from individual tiddlers local stylesheets.
By "local" I mean that each regular tiddler can have a designated
style
field. This makes it much easier to style things because, well, the styling code is right there and there is no need to use a local<style>
block.In the stylesheet tiddler, the list of transclusions is rearrangeable with DnD to set precedence. The stylesheet tiddler can also have its own content, perhaps both before and after the generated list, so to define "base styles" and "top precedence styles" (at tiddler bottom), i.e beyond the aggregated content.
In edit mode, the stylesheet tiddler shows transclusions in edit-text widgets, i.e allows editing of the (remote) styles that really exist in the individual tiddlers.
There could be a separate stylesheet tiddler aggregating shadow stylesheets. Currently we must go dig in the plugin list to locate the stylesheets.
The tiddlers with the defined styles can have a
stylecomments
field that end up like/* comments */
in the generated stylesheet.Here's the kicker:
Any such regular tiddler can also edit (i.e transclude) another tiddlers style field! Thus any style that the user deems relevant for the current tiddler can be (manually) included for easy manipulation in the current tiddler.
And the user can set up a custom stylesheet that filters out whatever tiddler style fields are relevant for that designated stylesheet! There could be one designated to "buttons" another to "main layout", however he want's to slice and dice - they are just transclusions anyway! I'm reminded of an old quote by a wise man:
Hey! ;-)
Beta Was this translation helpful? Give feedback.
All reactions