Commit 03a43f2d87ef33e0a795474b6da5df9fa9d29c2c

Authored by totoro
1 parent fac0e891

add empty alternative into CoreAttrs

Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
web/CXM_making_a_web_site.anubis
... ... @@ -1085,6 +1085,7 @@ public type HtmlEvents:
1085 1085 ontoggle. //HTML5 Fires when the user opens or closes the <details> element
1086 1086  
1087 1087 public type CoreAttrs:
  1088 + empty,
1088 1089 id (String),
1089 1090 class (String),
1090 1091 style (String),
... ... @@ -4816,10 +4817,11 @@ define String
4816 4817 new_styles = if h is style(style_string) then [style_string . styles] else styles,
4817 4818 current = if h is
4818 4819 {
  4820 + empty then "",
4819 4821 id(id_name) then
4820 4822 " id=\"" + id_name + "\"",
4821   - class(class_name) then "",
4822   - style(style_string) then "",
  4823 + class(class_name) then "", //do nothing here, because we accumulate the class until we have some other attributes
  4824 + style(style_string) then "", //do nothing here, because we accumulate the style until we have some other attributes
4823 4825 title(title_string) then
4824 4826 " title=\"" + title_string + "\"",
4825 4827  
... ...