Interface DocumentCSSStyleSheet

All Superinterfaces:
CSSStyleSheet, ExtendedCSSStyleSheet<AbstractCSSRule>, StyleSheet
All Known Implementing Classes:
BaseDocumentCSSStyleSheet, DOMDocumentCSSStyleSheet

public interface DocumentCSSStyleSheet extends ExtendedCSSStyleSheet<AbstractCSSRule>
A style sheet that is able to take the responsibility to compute the styles associated to document elements.

Accordingly, it has a target medium (which can be null) and has abilities that 'normal' style sheets do not have, like dealing with rules that have different origins (author, user, etc).

  • Method Details

    • getTargetMedium

      String getTargetMedium()
      Gets the target medium for this sheet.
      Returns:
      the target medium, or null if has not been set.
    • getComputedStyle

      CSSComputedProperties getComputedStyle(CSSElement elm, String pseudoElt)
      Gets the computed style for the given Element and pseudo-element in the DOM Document associated to this style sheet.
      Parameters:
      elm - the element.
      pseudoElt - the pseudo-element.
      Returns:
      the computed style declaration.
    • clone

      Clone this style sheet.
      Specified by:
      clone in interface ExtendedCSSStyleSheet<AbstractCSSRule>
      Returns:
      the cloned style sheet.
    • clone

      DocumentCSSStyleSheet clone(String targetMedium)
      Clone this style sheet, but only preserving rules targeting the given medium.
      Parameters:
      targetMedium - the medium.
      Returns:
      a medium-specific pseudo-clone of this sheet.