Template:Created with/layout/doc: Difference between revisions
More actions
m +link |
m +explanation |
||
| Line 80: | Line 80: | ||
Besides the variations with <code>logo</code> and <code>text</code>, a great variety can be get with <code>background</code> colors and mainly with the <code>border</code> styles: | Besides the variations with <code>logo</code> and <code>text</code>, a great variety can be get with <code>background</code> colors and mainly with the <code>border</code> styles: | ||
* margin and padding are to alter with care - it is recommended to ''not modify'' them. The four parameters are for top, right, bottom, left. | * margin and padding are to alter with care - it is recommended to ''not modify'' them. The four parameters are for top, right, bottom, left. | ||
:* <code>margin</code> ( | :* <code>margin</code> e.g. (0 3px) the distance to surrounding items | ||
:* <code>padding</code> (2px 4px 2px 6px) distance to items within the box; the first and third parameter can alter the height of the box! | :* <code>padding</code> e.g. (2px 4px 2px 6px) distance to items within the box; the first and third parameter can alter the height of the box! | ||
* <code>color</code> (#000) the color of the text | * <code>color</code> (#000) the color of the text | ||
* <code>background</code> (#F8F9FA) very light grey, for good readability of the black text | * <code>background</code> (#F8F9FA) very light grey, for good readability of the black text | ||
* <code>border</code> (1px solid #BAB) the stroke-width, stroke-style, stroke-color; '''it is recommended to modify only that parameter'''. | * <code>border</code> (1px solid #BAB) the stroke-width, stroke-style, stroke-color; '''it is recommended to modify only that parameter'''. | ||
The '''total width''' of a box is left- | The '''total width''' of a box is <tt>margin-left</tt> + <tt>border-left</tt> + <tt>padding-left</tt> + <code>width</code> + <tt>padding-right</tt> + <tt>border-right</tt> + <tt>margin-right</tt>.<br> | ||
Similarly, the '''total height''' of a box equals top- | Similarly, the '''total height''' of a box equals to <tt>margin-top</tt> + <tt>border-top</tt> + <tt>padding-top</tt> + <code>height</code> + <tt>padding-bottom</tt> + <tt>border-bottom</tt> + <tt>margin-bottom</tt>. | ||
While ''margin'' and ''padding'' can be defined by name (e.g. <tt>margin-left</tt>, <tt>padding-top</tt>) '''or''' with one to four single parameters | |||
* 1 parameter: all four | |||
* 2 parameters: top & bottom, right & left | |||
* 3 parameters: top, right & left, bottom | |||
* 4 parameters: top, right, bottom, left | |||
the borders can be specified only explicitly by names, e.g. <code>border:1px solid #BAB;border-right-color:#000</code> | |||
<includeonly> | <includeonly> | ||
Revision as of 06:56, 26 January 2021
< Template: Created with/layout
Small box used by several templates:
- Created with
- InValid SVG
- Igen/amp
- Igen/emb, Igen/ptx
- Attrib
- Commonist
- Projekt Wappen, Projet Blasons and others
Usage
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
logo | filename | icon/logo to be displayed | empty | suggested |
iconsize | size | size for displaying the icon/logo | 33x22px | optional |
text | text | individual main text | 'empty' | suggested |
more | text | more text (additional) | empty | optional |
style | attributes | CSS style attributes, to overwrite the standard attributes | empty | optional |
width | attribute | the width dimension attribute for modification | auto | optional |
lang | langcode | ISO 639 language code | {{int:lang}} | optional |
Additional information
The template is intended to be used in the following namespaces: the File namespace
The template is intended to be used by the following user groups: all users
Placement:
In general within the file description – but can be elsewhere
Localization
This template is not intended to be localized. Normally it is the final output, after all translations have been done by the previous templates.
Iconsize
can consist of the two numerical values width and height; or only one of both:
width[px]- x
height[px] widthxheight[px]
The dimension unit is always px, whether it is specified or not.
Style attributes
Besides the variations with logo and text, a great variety can be get with background colors and mainly with the border styles:
- margin and padding are to alter with care - it is recommended to not modify them. The four parameters are for top, right, bottom, left.
margine.g. (0 3px) the distance to surrounding itemspaddinge.g. (2px 4px 2px 6px) distance to items within the box; the first and third parameter can alter the height of the box!
color(#000) the color of the textbackground(#F8F9FA) very light grey, for good readability of the black textborder(1px solid #BAB) the stroke-width, stroke-style, stroke-color; it is recommended to modify only that parameter.
The total width of a box is margin-left + border-left + padding-left + width + padding-right + border-right + margin-right.
Similarly, the total height of a box equals to margin-top + border-top + padding-top + height + padding-bottom + border-bottom + margin-bottom.
While margin and padding can be defined by name (e.g. margin-left, padding-top) or with one to four single parameters
- 1 parameter: all four
- 2 parameters: top & bottom, right & left
- 3 parameters: top, right & left, bottom
- 4 parameters: top, right, bottom, left
the borders can be specified only explicitly by names, e.g. border:1px solid #BAB;border-right-color:#000