• Skip to main content
  • Skip to search
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. Tecnología para desarrolladores web
  2. Referencia de la API Web
  3. CssRule
  4. cssRule.parentStyleSheet
  • Change language
  • View in English

cssRule.parentStyleSheet

 

Summary

parentStyleSheet returns the object type of style sheet, in which the rule is defined.

Syntax

stylesheet = cssRule.parentStyleSheet

Parameters

  • stylesheet stylesheet is an object type.

Instance

if (bgRule.parentStyleSheet! = MySheet) {
   // Style alien rule!
}

Letters

See Gecko DOM Reference: event # DOM_styleSheet_Object for more information about the interface type objects stylesheet.

Specification

DOM Level 2 Style - cssRule

Last modified: Apr 18, 2021, by MDN contributors

Change your language

Related Topics

  1. CSSRule
  2. Propiedades
    1. cssText
    2. parentRule
    3. parentStyleSheet
    4. This deprecated API should no longer be used, but will probably still work. type
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

Mozilla

© 2005-2021 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies