com.steadystate.css.dom
Class CSSMediaRuleImpl
java.lang.Object
com.steadystate.css.dom.CSSMediaRuleImpl
- CSSMediaRule, CSSRule, Serializable
public class CSSMediaRuleImpl
extends java.lang.Object
deleteRule
public void deleteRule(int index)
throws DOMException
Used to delete a rule from the media block.
- deleteRule in interface CSSMediaRule
index
- The index within the media block's rule collection of the
rule to remove.
getCssText
public String getCssText()
The parsable textual representation of the rule. This reflects the
current state of the rule and not its initial value.
- getCssText in interface CSSRule
getParentRule
public CSSRule getParentRule()
If this rule is contained inside another rule (e.g. a style rule
inside an @media block), this is the containing rule. If this rule is
not nested inside any other rules, this returns null
.
- getParentRule in interface CSSRule
getType
public short getType()
The type of the rule, as defined above. The expectation is that
binding-specific casting methods can be used to cast down from an
instance of the CSSRule
interface to the specific
derived interface implied by the type
.
- getType in interface CSSRule
insertRule
public int insertRule(String rule,
int index)
throws DOMException
Used to insert a new rule into the media block.
- insertRule in interface CSSMediaRule
rule
- The parsable text representing the rule. For rule sets
this contains both the selector and the style declaration. For
at-rules, this specifies both the at-identifier and the rule
content.index
- The index within the media block's rule collection of the
rule before which to insert the specified rule. If the specified
index is equal to the length of the media blocks's rule collection,
the rule will be added to the end of the media block.
- The index within the media block's rule collection of the
newly inserted rule.
setCssText
public void setCssText(String cssText)
throws DOMException
- setCssText in interface CSSRule
toString
public String toString()