A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/deleteRule below:

CSSStyleSheet: deleteRule() method - Web APIs

MDN Web Docs
  1. Web
  2. Web APIs
  3. CSSStyleSheet
  4. deleteRule()

Filter sidebar

In this article
  1. CSS Object Model (CSSOM)
  2. CSSStyleSheet
  3. Constructor
    1. CSSStyleSheet()
  4. Instance properties
    1. cssRules
    2. ownerRule
    3. rules Deprecated
  5. Instance methods
    1. addRule() Deprecated
    2. deleteRule()
    3. insertRule()
    4. removeRule() Deprecated
    5. replace()
    6. replaceSync()
  6. Inheritance
    1. StyleSheet
  7. Related pages for CSSOM
    1. CSS
    2. CSSConditionRule
    3. CSSFontFeatureValuesRule
    4. CSSFontPaletteValuesRule
    5. CSSGroupingRule
    6. CSSImportRule
    7. CSSKeyframeRule
    8. CSSKeyframesRule
    9. CSSLayerBlockRule
    10. CSSLayerStatementRule
    11. CSSMediaRule
    12. CSSNamespaceRule
    13. CSSPageDescriptors
    14. CSSPageRule
    15. CSSPropertyRule
    16. CSSRule
    17. CSSRuleList
    18. CSSStartingStyleRule
    19. CSSStyleDeclaration
    20. CSSStyleRule
    21. CSSSupportsRule
    22. CaretPosition
    23. MediaList
    24. MediaQueryList
    25. Screen
    26. StyleSheet
    27. StyleSheetList
  8. Guides
    1. CSS Declaration
    2. CSS Declaration Block
    3. Determining the dimensions of elements
    4. Managing screen orientation
    5. Using dynamic styling information
In this article CSSStyleSheet: deleteRule() method

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

The CSSStyleSheet method deleteRule() removes a rule from the stylesheet object.

Syntax

js

deleteRule(index)
Parameters
index

The index into the stylesheet's CSSRuleList indicating the rule to be removed.

Return value

None (undefined).

Examples

This example removes the first rule from the stylesheet myStyles.

js

myStyles.deleteRule(0);
Specifications Specification CSS Object Model (CSSOM)
# dom-cssstylesheet-deleterule
Browser compatibility See also Help improve MDN Was this page helpful to you? Learn how to contribute

.

This page was last modified on Oct 25, 2023 by MDN contributors.

View this page on GitHub

•

Report a problem with this content

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4