diff --git a/core/wiki/peek-stylesheets.tid b/core/wiki/peek-stylesheets.tid
index 6f364de77..58ffaebca 100644
--- a/core/wiki/peek-stylesheets.tid
+++ b/core/wiki/peek-stylesheets.tid
@@ -1,67 +1,52 @@
title: $:/snippets/peek-stylesheets
-\procedure expandable-stylesheets-list()
-\whitespace trim
-
-<$list filter="[all[shadows+tiddlers]tag[$:/tags/Stylesheet]!has[draft.of]]">
-<$let openState=`$:/state/peek-tiddler/open/$(currentTiddler)$$(qualify)$` open={{{ [get[text]else[no]] }}}>
--
-<$checkbox tiddler=<> field="text" checked="yes" style.appearance="none">
-
-<%if [match[yes]]%>
-{{$:/core/images/down-arrow|1em}}
-<%else%>
-{{$:/core/images/right-arrow|1em}}
-<%endif%>
-
-$checkbox>
-<$link/>
-<%if [match[yes]]%>
+\procedure expandable-content()
<$wikify name="styles" text={{!!text}}>
<$codeblock code=<> language="css"/>
$wikify>
-<%endif%>
-
-$let>
-$list>
-
\end
-\define stylesheets-list()
-\whitespace trim
-
-<$list filter="[all[shadows+tiddlers]tag[$:/tags/Stylesheet]!has[draft.of]]">
--
-<$link/>
-<$wikify name="styles" text={{!!text}}>
-
-
-<$text text=<>/>
-
-
-$wikify>
-
-$list>
-
-\end
-\whitespace trim
-
-<$let modeState=`$:/state/peek-stylesheets/mode/$(qualify)$` mode={{{ [get[text]else[expand]] }}}>
-
-<$checkbox tiddler=<> field="text" checked="yes" style.appearance="none">
+\procedure toggle-content()
+<$parameters openState="" open="[substitute[]get[text]else[no]]" openImage="$:/core/images/down-arrow" closedImage="$:/core/images/right-arrow" openCaption="" closedCaption="">
+<%if [!is[blank]] %>
+<$checkbox tiddler={{{ [substitute[]] }}} field="text" checked="yes" style.appearance="none">
-<%if [match[expand]]%>
-{{$:/core/images/chevron-right|1em}} {{$:/language/ControlPanel/Stylesheets/Expand/Caption}}
+<%if [subfiltermatch[yes]] %>
+<$transclude $tiddler=<> size="1em" /> <>
<%else%>
-{{$:/core/images/chevron-down|1em}} {{$:/language/ControlPanel/Stylesheets/Restore/Caption}}
+<$transclude $tiddler=<> size="1em" /> <>
<%endif%>
$checkbox>
+<%endif%>
+$parameters>
+\end
+
+\procedure expandable-list()
+\whitespace trim
+<$parameters filter="" openState="" open="[substitute[]get[text]else[no]]">
+
+<$list filter=<> >
+-
+<$transclude $variable="toggle-content" open=<> openState=<> />
+<$link/>
+<%if [subfiltermatch[yes]]%>
+<>
+<%endif%>
+
+$list>
+
+$parameters>
+\end
+
+<$let modeState=`$:/state/peek-stylesheets/mode/$(qualify)$` mode={{{ [get[text]else[expand]] }}} listFilter="[all[shadows+tiddlers]tag[$:/tags/Stylesheet]!has[draft.of]]">
+
+<$transclude $variable="toggle-content" openImage="$:/core/images/chevron-right" closedImage="$:/core/images/chevron-down" openState=<> openCaption={{$:/language/ControlPanel/Stylesheets/Expand/Caption}} closedCaption={{$:/language/ControlPanel/Stylesheets/Restore/Caption}}/>
<%if [match[expand]]%>
-<>
+<$transclude $variable="expandable-list" filter=<> open="yes"/>
<%else%>
-<>
+<$transclude $variable="expandable-list" filter=<> openState="$:/state/peek-tiddler/open/$(currentTiddler)$$(qualify)$"/>
<%endif%>
$let>
\ No newline at end of file