mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-04 07:19:56 +00:00
a23ee165d8
Using the new wikify operator. Currently has a bug whereby redirected colours (like "tiddler-background") do not work. Direct colours like "background" do work. Note the hacks needed to makeFakeWidgetWithVariables work
66 lines
2.0 KiB
Plaintext
66 lines
2.0 KiB
Plaintext
title: $:/core/macros/CSS
|
|
tags: $:/tags/Macro $:/tags/Global
|
|
|
|
<!-- Needs to stay that way for backwards compatibility. See GH issue: #8326 -->
|
|
\function colour(name)
|
|
[{$:/palette}getindex<name>] :else[{$:/palettes/Vanilla}getindex<name>] :else[[$:/config/DefaultColourMappings/]addsuffix<name>get[text]] :and[wikify[text],[inline]]
|
|
\end colour
|
|
|
|
\function color(name)
|
|
[function[colour],<name>]
|
|
\end function
|
|
|
|
\function box-shadow(shadow)
|
|
[[ -webkit-box-shadow: $(shadow)$;
|
|
-moz-box-shadow: $(shadow)$;
|
|
box-shadow: $(shadow)$;]substitute[]]
|
|
\end
|
|
|
|
\function filter(filter)
|
|
[[ -webkit-filter: $(filter)$;
|
|
-moz-filter: $(filter)$;
|
|
filter: $(filter)$;]substitute[]]
|
|
\end
|
|
|
|
\function transition(transition)
|
|
[[ -webkit-transition: $(transition)$;
|
|
-moz-transition: $(transition)$;
|
|
transition: $(transition)$;]substitute[]]
|
|
\end
|
|
|
|
\function transform-origin(origin)
|
|
[[ -webkit-transform-origin: $(origin)$;
|
|
-moz-transform-origin: $(origin)$;
|
|
transform-origin: $(origin)$;]substitute[]]
|
|
\end
|
|
|
|
\function 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)$);]substitute[]]
|
|
\end
|
|
|
|
\function column-count(columns)
|
|
[[-moz-column-count: $(columns)$;
|
|
-webkit-column-count: $(columns)$;
|
|
column-count: $(columns)$;]substitute[]]
|
|
\end
|
|
|
|
\procedure datauri(title)
|
|
<$macrocall $name="makedatauri" type={{{ [<title>get[type]] }}} text={{{ [<title>get[text]] }}} _canonical_uri={{{ [<title>get[_canonical_uri]] }}}/>
|
|
\end
|
|
|
|
\procedure if-sidebar(text)
|
|
<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes"><<text>></$reveal>
|
|
\end
|
|
|
|
\procedure if-no-sidebar(text)
|
|
<$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes"><<text>></$reveal>
|
|
\end
|
|
|
|
\procedure if-background-attachment(text)
|
|
<$reveal state="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" type="nomatch" text=""><<text>></$reveal>
|
|
\end
|