1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00
TiddlyWiki5/core/ui/PageStylesheet.tid
Jermolene 9fbe72a877 Rearrange system tag configuration
By rearranging the `[all[]]` operator we are able to ensure that shadow
tiddlers get processed before ordinary tiddlers. This makes it easier
to create custom stylesheets that override the core.
2014-04-18 09:28:14 +01:00

60 lines
1.4 KiB
Plaintext

title: $:/core/ui/PageStylesheet
\define colour(name)
<$transclude tiddler={{$:/palette}} index="$name$"/>
\end
\define color(name)
<<colour $name$>>
\end
\define box-shadow(shadow)
```
-webkit-box-shadow: $shadow$;
-moz-box-shadow: $shadow$;
box-shadow: $shadow$;
```
\end
\define filter(filter)
```
-webkit-filter: $filter$;
-moz-filter: $filter$;
filter: $filter$;
```
\end
\define transition(transition)
```
-webkit-transition: $transition$;
-moz-transition: $transition$;
transition: $transition$;
```
\end
\define transform-origin(origin)
```
-webkit-transform-origin: $origin$;
-moz-transform-origin: $origin$;
transform-origin: $origin$;
```
\end
\define background-linear-gradient(gradient)
```
background-image: linear-gradient($gradient$);
background-image: -o-linear-gradient($gradient$);
background-image: -moz-linear-gradient($gradient$);
background-image: -webkit-linear-gradient($gradient$);
background-image: -ms-linear-gradient($gradient$);
```
\end
\define datauri(title)
<$macrocall $name="makedatauri" type={{$title$!!type}} text={{$title$}}/>
\end
\define if-sidebar(text)
<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes">$text$</$reveal>
\end
\define if-no-sidebar(text)
<$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes">$text$</$reveal>
\end
<$list filter="[all[shadows+tiddlers]tag[$:/tags/stylesheet]]">
<$transclude/>
</$list>