CssCustomMediaRule Class

https://drafts.csswg.org/mediaqueries-5/#csscustommediarule: a custom media query (@custom-media --name query;). The references to the custom media queries ((--name)) in the media queries of the style sheets of the document (@media, @import...) evaluate to the query of the last rule with that name; they are false when there is no such rule, in a cycle, and in the other media queries (e.g. matchMedia()).

public sealed class CssCustomMediaRule : CssRule
Inheritance
CssRule CssCustomMediaRule

Properties

NameDescription
NameGets the name of the custom media query, including the leading --.
QueryThe media query list of the rule, or the boolean of the true and false queries.

Gets the name of the custom media query, including the leading --.

public string Name { get; }

The media query list of the rule, or the boolean of the true and false queries.

public MediaListOrBoolean Query { get; }