Jadelet Example Garden

Style Attributes (Multiple)

Multiple styles work too. An important thnig to note is that any string style will crush any previous styles. Consecutive object styles will merge and only overwrite properties with the same name. This is because a string style is equivalent to element.style = styleString and object styles are equivalent to Object.assign element.style, styleObject.

h1(style=@firstStyle style=@secondStyle) Cool
  firstStyle: """
    color: green;
    background-color: purple;
    border: 2px dashed magenta;
    backgroundColor: "orange"
    color: "red"