mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Give plugin authors the chance to extend a palette (#6624)
* Give plugin authors the chance to extend a palette * Update CSS.tid * Update ColourMacro.tid * Update CSS.tid * Update ColourMacro.tid * Add whitespace trim to colour macro
This commit is contained in:
parent
383c8b5e49
commit
b3b3020d99
@ -2,7 +2,14 @@ title: $:/core/macros/CSS
|
||||
tags: $:/tags/Macro
|
||||
|
||||
\define 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/DefaultColourPaletteMappings/]addsuffix<__palette__>addsuffix[/]addsuffix<__name__>] }}}/>
|
||||
<$transclude tiddler={{{ [[$:/config/DefaultColourMappings/]addsuffix<__name__>] }}}/>
|
||||
</$transclude>
|
||||
</$transclude>
|
||||
</$transclude>
|
||||
\end
|
||||
|
||||
\define color(name)
|
||||
|
@ -1,5 +1,5 @@
|
||||
created: 20150221154058000
|
||||
modified: 20200228142855357
|
||||
modified: 20220416090558106
|
||||
tags: Macros [[Core Macros]]
|
||||
title: colour Macro
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -7,7 +7,7 @@ caption: colour
|
||||
|
||||
The <<.def colour>> (or <<.def color>>) [[macro|Macros]] returns the [[CSS|Cascading Style Sheets]] value of one the colours in the current [[palette|ColourPalettes]].
|
||||
|
||||
If no such entry exists in the current palette, the [[vanilla palette|$:/palettes/Vanilla]] is used instead. If no such entry exists in the vanilla palette, the system looks for a configuration tiddler with the title `$:/config/DefaultColourMappings/<colour-name>` and transcludes the colour from the text field. This enables to plugins to ship defaults for colours that are not present in the core palettes.
|
||||
If no such entry exists in the current palette, the system looks for a configuration tiddler with the title `$:/config/DefaultColourMappings/<palette>/<colour-name>` and transcludes the colour from the text field. If no such entry exists, the [[vanilla palette|$:/palettes/Vanilla]] is used instead. If no such entry exists in the vanilla palette, the system looks for a configuration tiddler with the title `$:/config/DefaultColourMappings/<colour-name>` and transcludes the colour from the text field. This enables to plugins to ship defaults for colours that are not present in the core palettes.
|
||||
|
||||
!! Parameters
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user