Module:Dsize/doc: Difference between revisions
From Neodyland Wiki
More actions
m +link |
m format |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Module rating|r}} | |||
This module contains very few code - but it is heavily used.<br> | This module contains very few code - but it is heavily used.<br> | ||
It is needed to verify that a given '''display size''' is trailed by "px".<br> | It is needed to verify that a given '''display size''' is trailed by "px".<br> | ||
| Line 10: | Line 10: | ||
{| | {| | ||
|- | |- | ||
|<nowiki>{{#invoke:Dsize|main| | |<nowiki>{{#invoke:Dsize|main|72px}}</nowiki> || {{#invoke:Dsize|main|72px}} || width | ||
|- | |- | ||
|<nowiki>{{#invoke:Dsize|main| | |<nowiki>{{#invoke:Dsize|main|72}}</nowiki> || {{#invoke:Dsize|main|72}} || width | ||
|- | |- | ||
|<nowiki>{{#invoke:Dsize|main| | |<nowiki>{{#invoke:Dsize|main|72x}}</nowiki> || {{#invoke:Dsize|main|72x}} || width | ||
|- | |- | ||
|<nowiki>{{#invoke:Dsize|main|x64px}}</nowiki> || {{#invoke:Dsize|main|x64px}} | |<nowiki>{{#invoke:Dsize|main|x64px}}</nowiki>|| {{#invoke:Dsize|main|x64px}} || height | ||
|- | |||
|<nowiki>{{#invoke:Dsize|main|72x64}}</nowiki> {{0}}|| {{#invoke:Dsize|main|72x64}} {{0}}|| w × h | |||
|} | |} | ||
{{M|Galeria|+}} has a similar but more complex function. | {{M|Galeria|+}} has a similar but more powerful and complex function. | ||
Latest revision as of 10:25, 31 January 2021
This module contains very few code - but it is heavily used.
It is needed to verify that a given display size is trailed by "px".
It can be expanded to check for other dimensions, as e.g. "em".
it will be used by Template:F, Created with/layout, ...
Use it with e.g. {{#invoke:Dsize|main|{{{sizepar}}} }}
- Examples:
| {{#invoke:Dsize|main|72px}} | 72px | width |
| {{#invoke:Dsize|main|72}} | 72px | width |
| {{#invoke:Dsize|main|72x}} | 72xpx | width |
| {{#invoke:Dsize|main|x64px}} | x64px | height |
| {{#invoke:Dsize|main|72x64}} | 72x64px | w × h |
Module:Galeria has a similar but more powerful and complex function.