mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-30 07:50:47 +00:00
b3b3020d99
* Give plugin authors the chance to extend a palette * Update CSS.tid * Update ColourMacro.tid * Update CSS.tid * Update ColourMacro.tid * Add whitespace trim to colour macro
84 lines
2.0 KiB
Plaintext
84 lines
2.0 KiB
Plaintext
title: $:/core/macros/CSS
|
|
tags: $:/tags/Macro
|
|
|
|
\define colour(name)
|
|
\whitespace trim
|
|
<$transclude tiddler={{$:/palette}} index=<<__name__>>>
|
|
<$transclude tiddler="$:/palettes/Vanilla" index=<<__name__>>>
|
|
<$transclude tiddler={{{ [[$:/config/DefaultColourPaletteMappings/]addsuffix<__palette__>addsuffix[/]addsuffix<__name__>] }}}/>
|
|
<$transclude tiddler={{{ [[$:/config/DefaultColourMappings/]addsuffix<__name__>] }}}/>
|
|
</$transclude>
|
|
</$transclude>
|
|
</$transclude>
|
|
\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 column-count(columns)
|
|
``
|
|
-moz-column-count: $columns$;
|
|
-webkit-column-count: $columns$;
|
|
column-count: $columns$;
|
|
``
|
|
\end
|
|
|
|
\define datauri(title)
|
|
<$macrocall $name="makedatauri" type={{$title$!!type}} text={{$title$}} _canonical_uri={{$title$!!_canonical_uri}}/>
|
|
\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
|
|
|
|
\define if-background-attachment(text)
|
|
<$reveal state="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" type="nomatch" text="">$text$</$reveal>
|
|
\end
|