end
# Tag attributes map
- var attrs: Map[String, String] = new HashMap[String, String]
+ var attrs: Map[String, String] = new HashMap[String, String] is lazy
# Get the attributed value of 'prop' or null if 'prop' is undifened
#
end
# CSS classes
- var classes: Set[String] = new HashSet[String]
+ var classes: Set[String] = new HashSet[String] is lazy
# Add multiple CSS classes
#
css_props[prop] = value
return self
end
- private var css_props: Map[String, String] = new HashMap[String, String]
+ private var css_props: Map[String, String] = new HashMap[String, String] is lazy
# Get CSS value for 'prop'
#
end
private fun render_attrs_in(res: Sequence[String]) do
+ if not isset _attrs and not isset _classes and not isset _css_props then return
if attrs.has_key("class") or not classes.is_empty then
res.add " class=\""
for cls in classes do