Class StyleSheet
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
An object implementing the StyleSheet interface represents a single style sheet. CSS style sheets will further implement the more specialized CSSStyleSheet interface.
[Value("StyleSheet")]
public class StyleSheet
- Inheritance
-
StyleSheet
- Derived
- Inherited Members
Remarks
Constructors
StyleSheet()
public StyleSheet()
Properties
Disabled
The disabled property of the
StyleSheet interface determines whether the style sheet is prevented from
applying to the document.
[Value("disabled")]
public bool Disabled { get; set; }
Property Value
- bool
A boolean.
Remarks
A style sheet may be disabled by manually setting this property to true or
if it's an inactive alternative style sheet. Note that disabled === false does not guarantee the style
sheet is applied (it could be removed from the document, for instance).
Href
The href property of the StyleSheet
interface returns the location of the style sheet.
[Value("href")]
public string? Href { get; }
Property Value
- string
A string containing the stylesheet's URI.
Remarks
This property is read-only.
Media
The media property of the StyleSheet interface specifies the intended destination media for style information. It is a read-only, array-like MediaList object and can be removed with deleteMedium() and added with appendMedium().
[Value("media")]
public MediaList Media { get; }
Property Value
- MediaList
A read-only array-like
MediaListobject.
Remarks
OwnerNode
The ownerNode property of the
StyleSheet interface returns the node that associates this style sheet
with the document.
[Value("ownerNode")]
public Union23? OwnerNode { get; }
Property Value
Remarks
This is usually an HTML<link> or<style> element, but
can also return a processing instruction node in the case of <?xml-stylesheet ?>.
ParentStyleSheet
The parentStyleSheet property of the
StyleSheet interface returns the style sheet, if any, that is including
the given style sheet.
[Value("parentStyleSheet")]
public CSSStyleSheet? ParentStyleSheet { get; }
Property Value
- CSSStyleSheet
A StyleSheet object.
Remarks
Title
The title property of the StyleSheet interface returns the advisory title of the current style sheet.
[Value("title")]
public string? Title { get; }
Property Value
Remarks
The title is often specified in the StyleSheetOwnerNode.
Type
The type property of the StyleSheet
interface specifies the style sheet language for the given style sheet.
[Value("type")]
public string Type { get; }
Property Value
- string
A string.