Interface StyleElement

All Superinterfaces:
DomQueryable, Element, EventTarget, Node

public interface StyleElement extends Element
Style element used to link SCSS stylesheets to a document.

If the Attributes.SOURCE is set, then the element will use ViewResources.loadStylesheet(String) to load it. Any changes to the source attribute cause the stylesheet to be loaded again.

If the Attributes.SOURCE is not set, then the element's text content will be parsed as a stylesheet, and changes to the element's content will cause the stylesheet to be parsed again.

See Also:
  • Method Details

    • getStylesheet

      @Nullable @Nullable Stylesheet getStylesheet()
      Get the stylesheet that was created by this element.

      Note that the stylesheet itself will only be loaded or parsed after the style element has been added to a document's header. Before that, this method will return null.

      Returns:
      Stylesheet
    • getSource

      @Nullable @Nullable String getSource()
      Get the value of the Attributes.SOURCE attribute
      Returns:
      Source attribute value