just wanted to share how amazing the support for CSS is. I simply created a tiddler with W3.CSS content tagged with $:/tags/Stylesheet as per documentation. Then I use it like this:
Note that using <link rel="stylesheet" href="https://..."> creates an online dependency. If you ever intend to work offline (i.e., without an internet connection), then the referenced stylesheet will be unavailable, which may have a significant impact on the appearance and usability of your TiddlyWiki.
I did experiment with a startup module that depending on a config setting, placed a script tag in the header or ‘downloaded’ the javascript library into the text of a library module… I wonder if you could do the same for CSS ?
This is technically correct but if you have already visited a site on the same device I think its possible it will be cached. Especially if you still have it opened in a tab.
Hi All,
I managed to modify my experiment to allow for switching between the link and embedded CSS - A demo of this is available here
The demo is a bit flakey as it uses the WidgetMessage: tm-http-request which acts a little bit asychronously to store the resulting CSS data to a tiddler. Curious if anyone thinks this is a bug or needs a feature change…
Also of interest is that W3S rejected the request for the CSS possibly as a CORS restriction - so i needed to source the stylesheet through a CDN alternative
Thank you for suggesting the additional implementation options. For now I’ll stay with the offline method. I’m working on a knowledge base / quick reference manual that needs full offline operation.
I’ve exported an icon and imported it into my tiddly. Then, is it correct to use it as a transcluded tiddler like so: {{$:/images/phosphor-icons/regular/first-aid-kit}}? This is the only way I could make it work.
What seems odd is that, if I copy the SVG code to a fresh tiddler and select the SVG as the content type, it doesn’t render. If I leave the content type empty, it renders.
Sorry, I forgot. Thats because they have a type field that supports svg. There are a couple of different steps to use them the way I suggested, with a paste.