standard.settings.cssContainer

getElement(id).settings.cssContainer("styleName", "style")

or getElement(id).settings.cssContainer({"style name 1": "style 1", "style name 2": "style 2"})

Applies the CSS style(s) to the container’s element.

This will affect both the element itself and any element wrapping it as added via .settings.before or .settings.after.

This command often more closely accomplishes what you want to achieve than the .settings.css command.

Example:

newText("frame", " world")
    .settings.before( newText("Hello ") )
    .settings.css("border", "solid 1px black")
    .settings.cssContainer("border", "solid 1px red")
    .print()

Prints the text world preceded with the text Hello and adds a black frame around world and a red frame around the whole Hello world text.