From 5fa8a1e08acfc39f5b14fae7db92a3133dfbc51e Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 19 Dec 2014 14:48:12 +0000 Subject: [PATCH] Docs tweaks --- .../about/Documentation Style Guide.tid | 7 ++++++- .../tiddlers/howtos/Using Stylesheets.tid | 18 +++++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/editions/tw5.com/tiddlers/about/Documentation Style Guide.tid b/editions/tw5.com/tiddlers/about/Documentation Style Guide.tid index edf37c209..63068ffee 100644 --- a/editions/tw5.com/tiddlers/about/Documentation Style Guide.tid +++ b/editions/tw5.com/tiddlers/about/Documentation Style Guide.tid @@ -37,13 +37,18 @@ Use [[British spellings in preference to US spellings|http://en.wikipedia.org/wi ! Abbreviations -We try to avoid abbreviations, but the following are acceptable: +We try to avoid abbreviations for ordinary words, but the following are acceptable: * `e.g.` for ''for example'' * `i.e.` for ''that is to say'' Note that the periods should not be omitted from these abbreviations. +Technical abbreviations should be in upper case and omit periods: + +* ''HTML'', not ''html'' or ''H.T.M.L.'' +* ''CSS'', not ''css'' + ! Typographic Standards !! Referring to Titles, Fields, Tags diff --git a/editions/tw5.com/tiddlers/howtos/Using Stylesheets.tid b/editions/tw5.com/tiddlers/howtos/Using Stylesheets.tid index f6184711a..de5b295ad 100644 --- a/editions/tw5.com/tiddlers/howtos/Using Stylesheets.tid +++ b/editions/tw5.com/tiddlers/howtos/Using Stylesheets.tid @@ -27,19 +27,27 @@ If you wish to use macros and transclusions in your stylesheets you should inste ``` \rules only filteredtranscludeinline transcludeinline macrodef macrocallinline html +body.tc-body pre { + <> +} +``` + +The `\rules` pragma at the top of the tiddler restricts the WikiText to just allow macros and transclusion. This avoids mistakenly triggering unwanted WikiText processing. + +A stylesheet tiddler is processed such that it is first wikified and then the text portion of the ouput is extracted to apply as the CSS. Any HTML tags you will use in your stylesheet are thus ignored. For example, HTML elements generated by the RevealWidget will not affect the output. As in the following example, you can wrap CSS rules in `
` tags to display them as a codeblock without affecting processing, including handling the inner macro.
+
+```
+\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline html
+
 
body.tc-body pre {
 	<>
 }
 
``` -The `\rules` pragma at the top of the tiddler restricts the WikiText to just allow macros and transclusion. This avoids mistakenly triggering unwanted WikiText processing. - -A stylesheet tiddler is processed such that it is wikified first and then its text extracted so as to apply only css. Any html tags you will use in your stylesheet are thus eventually ignored. For example, html elements generated by the reveal widget will not affect the output. As in the example above, you could also wrap css rules in `
` tags to display them as a codeblock which will, however, still correctly wikify the inner macro.
-
 !! Stylesheet Macros
 
-Several globally available macros are provided that are helpful in constructing stylesheets. See [[$:/core/ui/PageStylesheet]] for the definitions of these macros.
+Several globally available macros are provided that are helpful in constructing stylesheets. See [[$:/core/macros/CSS]] for the definitions of these macros.
 
 * `<>` and `<>` retrieve named colours from the current [[colour palette|ColourPalettes]]
 * `<>` specify a box-shadow