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,
containing the value of the media attribute of the associated stylesheet.

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

Property Value

MediaList

Returns a MediaList object.The value of media can be set by passing a string containing the media attribute; for example "print".

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