mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Add a snippet to visualise faulty stylesheets (#6268)
* Add a snippet to visualise faulty stylesheets As discussed in https://github.com/Jermolene/TiddlyWiki5/issues/6176, a faulty stylesheet can propagate and break several other stylesheets. This can be tricky to debug in a wiki with a lot of custom stylesheets. This wikitext snippet will display a list of the stylesheets created/modified by the user and will display a red cross next to the one causing a parsing error. * Improve the css code and add a message This commit add a short message that provide guidance on how to fix the CSS error(s).
This commit is contained in:
parent
7b311b0e4a
commit
6ea7140e8f
15
core/wiki/debugstylesheets.tid
Normal file
15
core/wiki/debugstylesheets.tid
Normal file
@ -0,0 +1,15 @@
|
||||
title: $:/snippets/DebugStylesheets
|
||||
|
||||
Broken stylesheets will have a red cross next to their name :
|
||||
|
||||
<style>[test]{list-style:'❌'}</style>
|
||||
<ul>
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Stylesheet]has[modified]]" counter=n>
|
||||
<style>{{!!text}}[test="<<n>>"]{list-style:disc;}</style>
|
||||
<li test=<<n>>><$link/></li>
|
||||
</$list>
|
||||
</ul>
|
||||
|
||||
Replace "list-style:disc;" by "display:none;" to only display the stylesheets with css syntax error.
|
||||
|
||||
These may contains [[unclosed block(s)|https://www.w3.org/TR/css-syntax-3/#consume-a-simple-block]], please review and fix them to prevent tiddlywiki's interface from malfunctioning.
|
Loading…
Reference in New Issue
Block a user