1. /*
  2. * Copyright (c) 2000 World Wide Web Consortium,
  3. * (Massachusetts Institute of Technology, Institut National de
  4. * Recherche en Informatique et en Automatique, Keio University). All
  5. * Rights Reserved. This program is distributed under the W3C's Software
  6. * Intellectual Property License. This program is distributed in the
  7. * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  8. * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  9. * PURPOSE.
  10. * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
  11. */
  12. package org.w3c.dom.css;
  13. import org.w3c.dom.stylesheets.DocumentStyle;
  14. import org.w3c.dom.Element;
  15. /**
  16. * This interface represents a document with a CSS view.
  17. * <p> The <code>getOverrideStyle</code> method provides a mechanism through
  18. * which a DOM author could effect immediate change to the style of an
  19. * element without modifying the explicitly linked style sheets of a
  20. * document or the inline style of elements in the style sheets. This style
  21. * sheet comes after the author style sheet in the cascade algorithm and is
  22. * called override style sheet. The override style sheet takes precedence
  23. * over author style sheets. An "!important" declaration still takes
  24. * precedence over a normal declaration. Override, author, and user style
  25. * sheets all may contain "!important" declarations. User "!important" rules
  26. * take precedence over both override and author "!important" rules, and
  27. * override "!important" rules take precedence over author "!important"
  28. * rules.
  29. * <p> The expectation is that an instance of the <code>DocumentCSS</code>
  30. * interface can be obtained by using binding-specific casting methods on an
  31. * instance of the <code>Document</code> interface.
  32. * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
  33. * @since DOM Level 2
  34. */
  35. public interface DocumentCSS extends DocumentStyle {
  36. /**
  37. * This method is used to retrieve the override style declaration for a
  38. * specified element and a specified pseudo-element.
  39. * @param elt The element whose style is to be modified. This parameter
  40. * cannot be null.
  41. * @param pseudoElt The pseudo-element or <code>null</code> if none.
  42. * @return The override style declaration.
  43. */
  44. public CSSStyleDeclaration getOverrideStyle(Element elt,
  45. String pseudoElt);
  46. }