CssMediaRule Class

https://drafts.csswg.org/css-conditional-3/#the-cssmediarule-interface

public sealed class CssMediaRule : CssConditionRule
Inheritance
CssConditionRule CssMediaRule

Properties

NameDescription
ConditionTextGets the serialized media query list of the rule.
Matcheshttps://drafts.csswg.org/css-conditional-5/#dom-cssmediarule-matches: there is no viewport, so the media features are not evaluated.
MediaGets the media query list of the rule.
TypeGets the legacy numeric type of the rule: CssRule.MediaRule for @media rules.

ConditionText

CSSRules.cs

Gets the serialized media query list of the rule.

public override string ConditionText { get; }

Property value

string

https://drafts.csswg.org/css-conditional-5/#dom-cssmediarule-matches: there is no viewport, so the media features are not evaluated.

public bool Matches { get; }

Gets the media query list of the rule.

public MediaList Media { get; }

Gets the legacy numeric type of the rule: CssRule.MediaRule for @media rules.

public override ushort Type { get; }

Property value

ushort