Interface DocumentCSSStyleSheet

All Superinterfaces:
CSSStyleSheet<AbstractCSSRule>, org.w3c.dom.css.CSSStyleSheet, org.w3c.dom.stylesheets.StyleSheet
All Known Implementing Classes:
BaseDocumentCSSStyleSheet, DOMDocumentCSSStyleSheet

public interface DocumentCSSStyleSheet extends CSSStyleSheet<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.
      the target medium, or null if has not been set.
    • getComputedStyle

      CSSComputedProperties getComputedStyle(CSSElement elm, Condition pseudoElt)
      Gets the computed style for the given Element and pseudo-element in the DOM Document associated to this style sheet.
      elm - the element.
      pseudoElt - the pseudo-element condition.
      the computed style declaration.
    • registerProperty

      void registerProperty(CSSPropertyDefinition definition)
      Registers the definition of a custom property.
      definition - the definition.
    • clone

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

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