Table of Contents

Class CSSImportRule

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The CSSImportRule interface represents an @import at-rule.

[Value("CSSImportRule")]
public class CSSImportRule : CSSRule
Inheritance
CSSImportRule
Inherited Members

Remarks

Constructors

CSSImportRule()

public CSSImportRule()

Properties

Href

The read-only href property of the
CSSImportRule interface returns the URL specified by the
@import at-rule.

[Value("href")]
public string Href { get; }

Property Value

string

A string.

Remarks

The resolved URL will be the href attribute of the
associated stylesheet.

See also on MDN

LayerName

The read-only layerName property of the CSSImportRule interface returns the name of the cascade layer created by the {{cssxref("@import")}} at-rule.

[Value("layerName")]
public string? LayerName { get; }

Property Value

string

A string, that can be empty, or the null object.

Remarks

If the created layer is anonymous, the string is empty (""), if no layer has been
created, it is the null object.

-Learning area : Cascade layers
-@import and @layer

See also on MDN

Media

The read-only media property of the CSSImportRule interface returns a MediaList object representing the media query list of the {{cssxref("@import")}} rule.

[Value("media")]
public MediaList Media { get; }

Property Value

MediaList

A MediaList object.Although the media property itself is read-only in the sense that you can't replace the MediaList object, you can still assign to the media property directly, which is equivalent to assigning to its MediaListmediaText property. You can also modify the MediaList object using the MediaListappendMedium and MediaListdeleteMedium methods.

Remarks

StyleSheet

The read-only styleSheet property of the
CSSImportRule interface returns the CSS Stylesheet specified by the
@import at-rule. This will be
in the form of a CSSStyleSheet object.

[Value("styleSheet")]
public CSSStyleSheet? StyleSheet { get; }

Property Value

CSSStyleSheet

A CSSStyleSheet.

Remarks

An @import at-rule always has
an associated stylesheet.

See also on MDN

SupportsText

The read-only supportsText property of the CSSImportRule interface returns the supports condition specified by the {{cssxref("@import")}} at-rule.

[Value("supportsText")]
public string? SupportsText { get; }

Property Value

string

A string, or null.

Remarks