Represents style attributes of the DOM element.
To access Style object of the element use its style property: element.style
Note that TIScript supports extended get-by-symbol notation so
el.style["background-color"] = "red"; // is an equivalent of
el.style#background-color = "red"; // extended "symbol" notation
To clear particular CSS attribute value that was set in runtime simply assign undefined value to it:
el.style#background-color = undefined; //
clear runtime style attribute - its computed value will be determined by normal CSS cascading process.
See list of supported names of CSS attributes.
To clear value of style attribute assign undefined value to it:
el.style#background-color = undefined;
<video>
element, it will return image representing current frame. display:none
or visibility:none
defined - element is excluded from layout and rendering completely.Clears all attributes previously set by using [attname] accessor for the element or the set() function.
Returns the style object itself allowing to chain the call with the set()
Sets or clears multiple style attributes on the element. As function accepts single object pareameter then it can be used with "object-call" notation:
el.style.set { display: "block", width: px(40), height: px(20) };
Creates and sets cursor from img and hotspotX/Y coordinates. To reset cursor to its default value use el.style.cursor(null)
;
Returns array of style rules applied to the element. Each element of the array is an object of following types:
Gathers all style defined style attributes and returns them as an object.
Returns value of CSS constant defined in CSS. It could be single value for the case (CSS):
@const SINGLE: #ff007f;
or array for the case like:
@const MULTY: 12px 14px;
The dimension method is an equivalent of setting these two style attributes:
elem.style.width = ... ; elem.style.height = ... ;
The only difference is when last parameter delayed = true
is provided. With it the method changes dimensions of the element immediately and defers remeasurement of children for some later time. It makes sense to use this method if you need to update dimensions of the overflow:auto | scroll element with many children in response of some frequent events like MOUSE_MOVE (E.g. in custom splitter implementation). In this case mutiple MOUSE_MOVEs will end up in only one remeasurement of element's content.
Enumerates CSS rules defined and used by the document. Returns number of rules processed.
Where:
function( selector, file, lineNo, usageCounter )
that receives CSS selector , file URL, line number where the rule is defined and the number of DOM elements that use this rule to the moment of the documentRules() call.function(props:object) : null | object
, properties accessor function, the function will receive CSS properties defined by the rule. If the function returns an object then properties of the CSS rule will be updated by the object properties.Therefore the documentRules function can be used as for inspection as for mutation of the CSS rules table associated with the document.
The method gets or sets (if varToSet provided) single CSS variable defined on the element.
The method gets or sets (if varsToSet provided) CSS variables defined on the element.