title: $:/core/macros/CSS tags: $:/tags/Macro \procedure actions-compile-palette-filtered(tempPalette,outputTitle) \function colour(name) [getindex] :else[get[palette-import]getindex] :map[subfilterjoin[ ]] <$let tv-palette-name=<> > <$list filter="[indexes[]sort[]]" variable="colour-name"> <$let colour-filter={{{ [getindex] }}}> <$action-setfield $tiddler=<> $index=<> $value={{{ [subfilterjoin[ ]] }}}/> \end actions-compile-palette-filtered \procedure actions-compile-palette-wikified(tempPalette,outputTitle) \define colour(name) \whitespace trim <$transclude tiddler=<> index="$name$"> <$transclude tiddler="$:/config/DefaultColourMappings/$name$"/> \end colour \define color(name) <> <$list filter="[indexes[]sort[]]" variable="colour-name" $debug="yes"> <$wikify name="colour-value" text={{{ [getindex] }}} mode="inline"> <$action-setfield $tiddler=<> $index=<> $value=<>/> \end actions-compile-palette-wikified \procedure actions-compile-palette(inputTitle,outputTitle,defaultImport="$:/palettes/Vanilla") <$let tempPalette="$:/temp/palette-source" > <$action-deletetiddler $tiddler=<>/> <$let importTitle={{{ [get[palette-import]else] }}}> <%if [!match[]] %> <$list filter="[indexes[]sort[]]" variable="colour-name"> <$action-setfield $tiddler=<> $index=<> $value={{{ [getindex] }}}/> <%endif%> <$list filter="[indexes[]sort[]]" variable="colour-name"> <$action-setfield $tiddler=<> $index=<> $value={{{ [getindex] }}}/> <%if [get[palette-type]match[modern]] %> <$transclude $variable="actions-compile-palette-filtered" tempPalette=<> outputTitle=<>/> <%else%> <$transclude $variable="actions-compile-palette-wikified" tempPalette=<> outputTitle=<>/> <%endif%> \end actions-compile-palette \procedure actions-switch-colour-palette(paletteTitle) \procedure tv-action-refresh-policy() always <$action-deletetiddler $tiddler="$:/temp/palette-colours"/> <$action-setfield $tiddler="$:/palette" $field="text" $value=<>/> <$transclude $variable="actions-compile-palette" inputTitle=<> outputTitle="$:/temp/palette-colours"/> \end actions-switch-colour-palette \procedure tv-palette-name() $:/temp/palette-colours \function colour(name) [getindex] :else[[$:/config/DefaultColourMappings/]addsuffixget[text]] \end colour \function color(name) [function[colour],] \end color \function tf.check-colour-contrast(paletteEntryA,paletteEntryB,threshold) [function[colour],] [function[colour],] +[colour-contrast:DeltaPhi[]compare:number:gtthen[ok]] :else[addsuffix[/]addsuffixaddsuffix[ contrast is too low]] \end tf.check-colour-contrast \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 \procedure datauri(title) <$macrocall $name="makedatauri" type={{{ [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