doc: Replace the rendering for the @property default values.

This commit is contained in:
Emmanuel Lepage Vallee 2022-07-10 01:19:38 -07:00
parent 31061cb2e6
commit 19e586f969
2 changed files with 21 additions and 3 deletions

View File

@ -70,7 +70,8 @@ dd > code,
td code,
span.default_value,
.see_also_description code,
.important_box code
.important_box code,
.property_type code
{
background-color: #eaedf587;
padding-left: 3px;
@ -523,7 +524,7 @@ dl.function dd {
margin-bottom: 15px;
}
#content dl.function dd h3 {
#content dl.function dd h3, .property_type i {
margin-top: 0px;
margin-left: 0px;
padding-left: 0px;
@ -747,3 +748,8 @@ pre .url { color: #272fc2; text-decoration: underline; }
.copy-link--failure {
background-color: red;
}
.property_type {
display: inline-block;
margin-left: 15px;
}

View File

@ -377,7 +377,19 @@
<dd>
$(M(ldoc.descript(item),item))
# if show_parms and item.params and #item.params > 0 and not item.hide_params then
# if kind == "Object properties" and item.params[1] then
</dd>
<span class="property_type">
<br/>
# if item:default_of_param(item.params[1]) then
<i>Default value: </b> <code>$(item:default_of_param(item.params[1]))</code><br/>
# end
# if item.params[1] then
<i>Type constraint: </b> $(M(item.params.map[item.params[1]],item))<br/>
# end
</span>
<dd>
# elseif show_parms and item.params and #item.params > 0 and not item.hide_params then
# local subnames = module.kinds:type_of(item).subnames
# if subnames then
<h3>$(subnames):</h3>