1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-28 19:10:28 +00:00

css-macro -- change tags to $:/tags/Global (#7987)

* $:/core/macros/CSS use v5.3.x syntax

* css-macro -- change tags to $:/tags/Global
This commit is contained in:
Mario Pietsch 2024-02-14 19:44:22 +01:00 committed by GitHub
parent 53ccc29209
commit 699d8b9416
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,76 +1,69 @@
title: $:/core/macros/CSS title: $:/core/macros/CSS
tags: $:/tags/Macro tags: $:/tags/Global
\define colour(name) \procedure colour(name)
<$transclude tiddler={{$:/palette}} index="$name$"><$transclude tiddler="$:/palettes/Vanilla" index="$name$"><$transclude tiddler="$:/config/DefaultColourMappings/$name$"/></$transclude></$transclude> \whitespace trim
<$transclude $tiddler={{$:/palette}} $index=`$(name)$`>
<$transclude $tiddler="$:/palettes/Vanilla" $index=`$(name)$`>
<$transclude $tiddler=`$:/config/DefaultColourMappings/$(name)$`/>
</$transclude>
</$transclude>
\end \end
\define color(name) \procedure color(name)
<<colour $name$>> <$macrocall $name=colour name=`$(name)$`/>
\end \end
\define box-shadow(shadow) \function box-shadow(shadow)
`` [[ -webkit-box-shadow: $(shadow)$;
-webkit-box-shadow: $shadow$; -moz-box-shadow: $(shadow)$;
-moz-box-shadow: $shadow$; box-shadow: $(shadow)$;]substitute[]]
box-shadow: $shadow$;
``
\end \end
\define filter(filter) \function filter(filter)
`` [[ -webkit-filter: $(filter)$;
-webkit-filter: $filter$; -moz-filter: $(filter)$;
-moz-filter: $filter$; filter: $(filter)$;]substitute[]]
filter: $filter$;
``
\end \end
\define transition(transition) \function transition(transition)
`` [[ -webkit-transition: $(transition)$;
-webkit-transition: $transition$; -moz-transition: $(transition)$;
-moz-transition: $transition$; transition: $(transition)$;]substitute[]]
transition: $transition$;
``
\end \end
\define transform-origin(origin) \function transform-origin(origin)
`` [[ -webkit-transform-origin: $(origin)$;
-webkit-transform-origin: $origin$; -moz-transform-origin: $(origin)$;
-moz-transform-origin: $origin$; transform-origin: $(origin)$;]substitute[]]
transform-origin: $origin$;
``
\end \end
\define background-linear-gradient(gradient) \function background-linear-gradient(gradient)
`` [[ background-image: linear-gradient($(gradient)$);
background-image: linear-gradient($gradient$); background-image: -o-linear-gradient($(gradient)$);
background-image: -o-linear-gradient($gradient$); background-image: -moz-linear-gradient($(gradient)$);
background-image: -moz-linear-gradient($gradient$); background-image: -webkit-linear-gradient($(gradient)$);
background-image: -webkit-linear-gradient($gradient$); background-image: -ms-linear-gradient($(gradient)$);]substitute[]]
background-image: -ms-linear-gradient($gradient$);
``
\end \end
\define column-count(columns) \function column-count(columns)
`` [[-moz-column-count: $(columns)$;
-moz-column-count: $columns$; -webkit-column-count: $(columns)$;
-webkit-column-count: $columns$; column-count: $(columns)$;]substitute[]]
column-count: $columns$;
``
\end \end
\define datauri(title) \procedure datauri(title)
<$macrocall $name="makedatauri" type={{$title$!!type}} text={{$title$}} _canonical_uri={{$title$!!_canonical_uri}}/> <$macrocall $name="makedatauri" type={{{ [<title>get[type]] }}} text={{{ [<title>get[text]] }}} _canonical_uri={{{ [<title>get[_canonical_uri]] }}}/>
\end \end
\define if-sidebar(text) \procedure if-sidebar(text)
<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes">$text$</$reveal> <$reveal state="$:/state/sidebar" type="match" text="yes" default="yes"><<text>></$reveal>
\end \end
\define if-no-sidebar(text) \procedure if-no-sidebar(text)
<$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes">$text$</$reveal> <$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes"><<text>></$reveal>
\end \end
\define if-background-attachment(text) \procedure if-background-attachment(text)
<$reveal state="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" type="nomatch" text="">$text$</$reveal> <$reveal state="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" type="nomatch" text=""><<text>></$reveal>
\end \end