standard.cssContainer
Audio Button Canvas Controller DropDown Html Image MediaRecorder Scale Text TextInput TextInput Tooltip Video Youtube syntax
getX(“ELEMENT_NAME”).cssContainer(“CSS_PROPERTY”, “VALUE”)
description
Applies the specified CSS property and value pair to the container of the element.
optional parameters
-
getX(“ELEMENT_NAME”).cssContainer({“CSS_PROPERTY_1”:”VALUE_1”, “CSS_PROPERTY_2”:”VALUE_2”})
Apply multiple CSS property and value pairs by using curly brackets and colons.
note(s)
This command affects the container of the element that it is called on, meaning that any elements added to an element through a call to standard.after
or standard.before
are also affected.
related
-
standard.after
: Takes an element as an argument, and adds that element's content to the right of the element that the command is called on.
example
newText("center", "BANANA")
.before(newText("left", "apple"))
.after(newText("right", "orange"))
.css("color", "red")
.cssContainer("background-color", "aqua")
.print()
↳ Prints appleBANANAorange
to the screen. The substring BANANA
has a red text color, and the entire string has an aqua background color.