mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-27 02:20:28 +00:00
e175746122
In practice the macros are always invoked in inline mode, meaning that the triple braces weren’t getting parsed correctly. Now we switch to inline code
65 lines
1.4 KiB
Plaintext
65 lines
1.4 KiB
Plaintext
title: $:/core/macros/CSS
|
|
tags: $:/tags/Macro
|
|
|
|
\define colour(name)
|
|
<$transclude tiddler={{$:/palette}} index="$name$"><$transclude tiddler="$:/palettes/Vanilla" index="$name$"/></$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 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
|