2014-06-12 17:01:33 +00:00
|
|
|
title: $:/core/macros/CSS
|
2024-10-22 12:15:34 +00:00
|
|
|
tags: $:/tags/Macro
|
2014-06-12 17:01:33 +00:00
|
|
|
|
2024-07-01 21:12:04 +00:00
|
|
|
<!-- Needs to stay that way for backwards compatibility. See GH issue: #8326 -->
|
2024-10-22 16:26:04 +00:00
|
|
|
\function colour(name)
|
|
|
|
[{$:/palette}getindex<name>] :else[{$:/palettes/Vanilla}getindex<name>] :else[[$:/config/DefaultColourMappings/]addsuffix<name>get[text]] :and[wikify[text],[inline]]
|
|
|
|
\end colour
|
2014-06-12 17:01:33 +00:00
|
|
|
|
2024-10-22 16:26:04 +00:00
|
|
|
\function color(name)
|
|
|
|
[function[colour],<name>]
|
2024-10-23 07:25:24 +00:00
|
|
|
\end color
|
2014-08-18 09:14:19 +00:00
|
|
|
|
2024-10-23 07:21:11 +00:00
|
|
|
\define box-shadow(shadow)
|
|
|
|
``
|
|
|
|
-webkit-box-shadow: $shadow$;
|
|
|
|
-moz-box-shadow: $shadow$;
|
|
|
|
box-shadow: $shadow$;
|
|
|
|
``
|
2014-08-18 09:14:19 +00:00
|
|
|
\end
|
|
|
|
|
2024-10-23 07:21:11 +00:00
|
|
|
\define filter(filter)
|
|
|
|
``
|
|
|
|
-webkit-filter: $filter$;
|
|
|
|
-moz-filter: $filter$;
|
|
|
|
filter: $filter$;
|
|
|
|
``
|
2014-08-18 09:14:19 +00:00
|
|
|
\end
|
|
|
|
|
2024-10-23 07:21:11 +00:00
|
|
|
\define transition(transition)
|
|
|
|
``
|
|
|
|
-webkit-transition: $transition$;
|
|
|
|
-moz-transition: $transition$;
|
|
|
|
transition: $transition$;
|
|
|
|
``
|
2014-08-18 09:14:19 +00:00
|
|
|
\end
|
|
|
|
|
2024-10-23 07:21:11 +00:00
|
|
|
\define transform-origin(origin)
|
|
|
|
``
|
|
|
|
-webkit-transform-origin: $origin$;
|
|
|
|
-moz-transform-origin: $origin$;
|
|
|
|
transform-origin: $origin$;
|
|
|
|
``
|
2014-08-18 09:14:19 +00:00
|
|
|
\end
|
|
|
|
|
2024-10-23 07:21:11 +00:00
|
|
|
\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$);
|
|
|
|
``
|
2014-08-18 09:14:19 +00:00
|
|
|
\end
|
|
|
|
|
2024-10-23 07:21:11 +00:00
|
|
|
\define column-count(columns)
|
|
|
|
``
|
|
|
|
-moz-column-count: $columns$;
|
|
|
|
-webkit-column-count: $columns$;
|
|
|
|
column-count: $columns$;
|
|
|
|
``
|
2016-08-27 13:24:03 +00:00
|
|
|
\end
|
|
|
|
|
2024-02-14 18:44:22 +00:00
|
|
|
\procedure datauri(title)
|
|
|
|
<$macrocall $name="makedatauri" type={{{ [<title>get[type]] }}} text={{{ [<title>get[text]] }}} _canonical_uri={{{ [<title>get[_canonical_uri]] }}}/>
|
2014-08-18 09:14:19 +00:00
|
|
|
\end
|
|
|
|
|
2024-02-14 18:44:22 +00:00
|
|
|
\procedure if-sidebar(text)
|
|
|
|
<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes"><<text>></$reveal>
|
2014-08-18 09:14:19 +00:00
|
|
|
\end
|
|
|
|
|
2024-02-14 18:44:22 +00:00
|
|
|
\procedure if-no-sidebar(text)
|
|
|
|
<$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes"><<text>></$reveal>
|
2014-08-18 09:14:19 +00:00
|
|
|
\end
|
2018-01-23 16:49:24 +00:00
|
|
|
|
2024-02-14 18:44:22 +00:00
|
|
|
\procedure if-background-attachment(text)
|
|
|
|
<$reveal state="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" type="nomatch" text=""><<text>></$reveal>
|
2018-01-23 16:49:24 +00:00
|
|
|
\end
|