Template:RoB style: Difference between revisions

From Ring of Brodgar
Jump to navigation Jump to search
m (include other style stuff (infoboxheader))
m (Remarks cleanup.)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly
<includeonly


><!--
>{{#if:{{{1|}}}
 
  NOTES:
  - Currently intended to be used with names that are set/available in "RoB_color" template.
  - Technically this generally would be done with css class styling. (but that's for later, potentially)
 
-->{{#if:{{{1|}}}
|  {{#switch:{{trim | {{{1}}} }}
|  {{#switch:{{trim | {{{1}}} }}
     |
     |
Line 13: Line 7:
     | infoboxsection = style="background-color:{{RoB color|infoboxsection}}; color:white; {{{2|}}}"
     | infoboxsection = style="background-color:{{RoB color|infoboxsection}}; color:white; {{{2|}}}"
     | infoboxfoother = style="background-color:{{RoB color|infoboxfoother}}; color:black; {{{2|}}}"
     | infoboxfoother = style="background-color:{{RoB color|infoboxfoother}}; color:black; {{{2|}}}"
    |
    | shareddata = style="display:table-cell; background-color:{{RoB color|shareddata}}; margin:0px; padding:4px; border:1px solid silver;"
     |
     |
     | #default = {{ambox|type=delete|text=<b>Template Warning:</b> RoB_style.<br> Parameter 1 (<i>style name</i>): Used style name (<i>{{{1}}}</i>) not found.}}
     | #default = {{ambox|type=delete|text=<b>Template Warning:</b> RoB_style.<br> Parameter 1 (<i>style name</i>): Used style name (<i>{{{1}}}</i>) not found.}}
Line 19: Line 15:
}}</includeonly
}}</includeonly


><noinclude><!--
><noinclude><!-- Debug --
-- >
;Debug-Preview
1) {{ {{PAGENAME}} }}<br>
1) {{ {{PAGENAME}} }}<br>
2) {{ {{PAGENAME}}|foobar}}<br>
2) {{ {{PAGENAME}}|foobar}}<br>
3) {{ {{PAGENAME}}|infoboxheader}}<br>
3) {{ {{PAGENAME}}|infoboxheader}}<br>
4) {{ {{PAGENAME}}|infoboxsection|color:red}}
4) {{ {{PAGENAME}}|infoboxsection|color:red}}<br>
5) {{ {{PAGENAME}}|shareddata}}<br>
-->{{documentation}}</noinclude>
-->{{documentation}}</noinclude>

Latest revision as of 10:32, 17 January 2023

Template documentation (for the template shown above, sometimes hidden or invisible)
Description
This is a global color-style support template.
...


Syntax
Basic use: {{RoB style|color-style-name}}
Used where a css style="..." command can be used.


Extended use: :{{RoB style|color-style-name|additional css}}
Important: As CSS don't supports multiple style-commands per element (it ignores all but the last one).
As such the additional css part needs to be used to add additional styling to an element.


Dependency
Uses and relies on the RoB color template for the actual used (background)colors.


Sample text-output
{{RoB style|infoboxheader}} => style="background-color:#3366CC; color:white; font-size:1.2em; padding:1em; "
{{RoB style|infoboxheader|border:2px;}} => style="background-color:#3366CC; color:white; font-size:1.2em; padding:1em; border:2px;"


Available color-style-names

infoboxheader: infoboxheader

infoboxsection: infoboxsection
infoboxfoother: infoboxfoother
shareddata: shareddata

Visit Template:RoB style/doc to edit this text! (How does this work?)