Skip to content

Commit

Permalink
docs: improve formatting in some tiddlers about StyleSheets
Browse files Browse the repository at this point in the history
  • Loading branch information
YakovL committed Feb 29, 2024
1 parent 6c6fd2b commit 7437a3c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
16 changes: 8 additions & 8 deletions content/AnotherExampleStyleSheet.tid
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,40 @@ This tiddler shows some more complex effects that can be obtained with cunning u
You can have special formatting for a specific, named tiddler like this:
{{{
#tiddlerHelloThere .title {
background-color: #99aaee;
background-color: #99aaee;
}
}}}

Or for the first displayed tiddler:
{{{
div.tiddler:first-child .title {
font-size: 28pt;
font-size: 28pt;
}
}}}

Or just for the first line of every tiddler:
{{{
.viewer:first-line {
background-color: #999999;
background-color: #999999;
}
}}}

Or just for the first letter of every tiddler:
{{{
.viewer:first-letter {
float: left;
font-size: 28pt;
font-weight: bold;
float: left;
font-size: 28pt;
font-weight: bold;
}
}}}

Or just for tiddlers tagged with a particular tag (note that this won't work for tags that contain spaces):
{{{
div[tags~="welcome"].tiddler .viewer {
background-color: #ffccaa;
background-color: #ffccaa;
}

div[tags~="features"].tiddler .viewer {
background-color: #88aaff;
background-color: #88aaff;
}
}}}
4 changes: 2 additions & 2 deletions content/CustomStyleSheet.tid
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ tags: features
title: CustomStyleSheet
type: text/x-tiddlywiki

You can skin TiddlyWiki with a special StyleSheet tiddler containing your own CSS style sheet declarations. Unlike hacking the HTML directly, the StyleSheet tiddler withstands upgrading to a new version of the TiddlyWiki code (see HowToUpgrade). You can also use the NestedStyleSheets feature to structure your CSS declarations.
You can skin ~TiddlyWiki with a special StyleSheet tiddler containing your own CSS style sheet declarations. Unlike hacking the HTML directly, the ~StyleSheet tiddler withstands upgrading to a new version of the ~TiddlyWiki code (see HowToUpgrade). You can also use the NestedStyleSheets feature to structure your CSS declarations.

The ExampleStyleSheet shows some of the basic options you can control (see AnotherExampleStyleSheet for more complex examples). SaveChanges and then click refresh in your browser to see StyleSheet changes. Any errors in your CSS syntax will be caught and displayed, but they shouldn't stop TiddlyWiki from working.
The ExampleStyleSheet shows some of the basic options you can control (see AnotherExampleStyleSheet for more complex examples). SaveChanges and then click refresh in your browser to see StyleSheet changes. Any errors in your CSS syntax will be caught and displayed, but they shouldn't stop ~TiddlyWiki from working.
8 changes: 5 additions & 3 deletions content/ExampleStyleSheet.tid
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ tags: examples
title: ExampleStyleSheet
type: text/x-tiddlywiki

#displayArea {background-color: #ffccff; }
#mainMenu {border: 1px solid #ffff88; }
#commandPanel {background-color: #008800; }
/*{{{*/
#displayArea { background-color: #ffccff; }
#mainMenu { border: 1px solid #ffff88; }
#commandPanel { background-color: #008800; }
/*}}}*/

0 comments on commit 7437a3c

Please sign in to comment.