diff --git a/themes/tiddlywiki/vanilla/ThemeTweaks.tid b/themes/tiddlywiki/vanilla/ThemeTweaks.tid
index 90f7e5556..30a58f23c 100644
--- a/themes/tiddlywiki/vanilla/ThemeTweaks.tid
+++ b/themes/tiddlywiki/vanilla/ThemeTweaks.tid
@@ -2,17 +2,46 @@ title: $:/themes/tiddlywiki/vanilla/themetweaks
tags: $:/tags/ControlPanel/Appearance
caption: Theme Tweaks
+\define backgroundimage-dropdown()
+
+<$button popup=<
> class="tc-btn-invisible tc-btn-dropdown">{{$:/core/images/down-arrow}}$button>
+<$reveal state=<> type="popup" position="belowleft" text="" default="">
+
+<$linkcatcher to="$:/themes/tiddlywiki/vanilla/settings/backgroundimage">
+<$link to="">
+(none)
+$link>
+
+<$list filter="[all[shadows+tiddlers]is[image]] -[type[application/pdf]] +[sort[title]]">
+<$link to={{!!title}}>
+<$transclude/> <$view field="title"/>
+$link>
+$list>
+$linkcatcher>
+
+$reveal>
+
+\end
+
+\define backgroundimageattachment-dropdown()
+<$select tiddler="$:/themes/tiddlywiki/vanilla/settings/backgroundimageattachment" default="scroll">
+
+
+$select>
+\end
+
You can tweak certain aspects of the ''Vanilla'' theme.
! Options
|[[Sticky titles|$:/themes/tiddlywiki/vanilla/options/stickytitles]]
//Causes tiddler titles to "stick" to the top of the browser window. Does not work at all with Chrome, and causes some layout issues in Firefox// |<$select tiddler="$:/themes/tiddlywiki/vanilla/options/stickytitles">$select> |
-
! Settings
-|[[Font family|$:/themes/tiddlywiki/vanilla/settings/fontfamily]] |<$edit-text tiddler="$:/themes/tiddlywiki/vanilla/settings/fontfamily" default="" tag="input"/> |
-|[[Code font family|$:/themes/tiddlywiki/vanilla/settings/codefontfamily]] |<$edit-text tiddler="$:/themes/tiddlywiki/vanilla/settings/codefontfamily" default="" tag="input"/> |
+|[[Font family|$:/themes/tiddlywiki/vanilla/settings/fontfamily]] |<$edit-text tiddler="$:/themes/tiddlywiki/vanilla/settings/fontfamily" default="" tag="input"/> | |
+|[[Code font family|$:/themes/tiddlywiki/vanilla/settings/codefontfamily]] |<$edit-text tiddler="$:/themes/tiddlywiki/vanilla/settings/codefontfamily" default="" tag="input"/> | |
+|[[Page background image|$:/themes/tiddlywiki/vanilla/settings/backgroundimage]] |<$edit-text tiddler="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" default="" tag="input"/> |<> |
+|[[Page background image attachment |$:/themes/tiddlywiki/vanilla/settings/backgroundimageattachment]] |<> | |
! Sizes
diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid
index a2cfcb296..e1f67848d 100644
--- a/themes/tiddlywiki/vanilla/base.tid
+++ b/themes/tiddlywiki/vanilla/base.tid
@@ -1,7 +1,24 @@
title: $:/themes/tiddlywiki/vanilla/base
tags: [[$:/tags/Stylesheet]]
+\define custom-background-datauri()
+<$reveal state="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" type="nomatch" text="">
+<$set name="background" value={{$:/themes/tiddlywiki/vanilla/settings/backgroundimage}}>
+<$list filter="[is[image]]">
+<$list filter="[!has[_canonical_uri]]">
+`background: url(`<$macrocall $name="datauri" title={{$:/themes/tiddlywiki/vanilla/settings/backgroundimage}}/>`);`
+$list>
+<$list filter="[has[_canonical_uri]]">
+`background: url(`<$view tiddler={{$:/themes/tiddlywiki/vanilla/settings/backgroundimage}} field="_canonical_uri"/>`);`
+$list>
+`background-attachment: `{{$:/themes/tiddlywiki/vanilla/settings/backgroundimageattachment}}`;`
+$list>
+$set>
+$reveal>
+\end
+
\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline
+
/*
** Start with the normalize CSS reset, and then belay some of its effects
*/
@@ -39,6 +56,7 @@ body.tc-body {
color: <>;
background-color: <>;
word-wrap: break-word;
+ <>
}
h1, h2, h3, h4, h5, h6 {