web.Style(name : str, value : str) : str
Create text for a 'style' attribute.
Usage Restrictions
1.8.3 or later.
Parameters
| Name | Type | Description |
name
| str
| The style name.
|
value
| str
| The style value.
|
Samples
| Output |
| To create width style text: {{ web.style('width', web.size(5)) }} | | width:5px; |
| Sample DekiScript extension to render an image using a style width and height specified by the user. Note that web.style and web.size are used to format the output:
<extension>
<function>
<name>image</name>
<description>Simple DekiScript Sample to render an image.</description>
<param name="width" type="int">width</param>
<param name="height" type="int">height</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<body>
<img src="http://wiki.opengarden.org/@api/deki/site/logo.png" eval:style="web.style('width', web.size(args.width)) .. web.style('height', web.size(args.height))"/>
</body>
</html>
</return>
</function>
</extension>
| | N/A |