Table of Contents

Interface IStyleSheet

Namespace
AngleSharp.Dom
Assembly
AngleSharp.dll

Represent a stylesheet for collecting style information.

[DomName("StyleSheet")]
public interface IStyleSheet : IStyleFormattable
Inherited Members
Extension Methods

Properties

Context

Gets the browsing context to use.

IBrowsingContext Context { get; }

Property Value

IBrowsingContext

Href

Gets the value of the attribute, which is its location. For inline style sheets, the value of this attribute is null.

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

Property Value

string

IsDisabled

Gets or sets if the stylesheet is applied to the document. Modifying this attribute may cause a new resolution of style for the document. If the media doesn't apply to the current user agent, the disabled attribute is ignored.

[DomName("disabled")]
bool IsDisabled { get; set; }

Property Value

bool

Media

Gets the indented destination media for style information. The media is often specified in the ownerNode. If no media has been specified, the MediaList is empty.

[DomName("media")]
[DomPutForwards("mediaText")]
IMediaList Media { get; }

Property Value

IMediaList

OwnerNode

Gets the element that associates this style sheet with the document.

[DomName("ownerNode")]
IElement OwnerNode { get; }

Property Value

IElement

Source

Gets the underlying source.

TextSource Source { get; }

Property Value

TextSource

Title

Gets the advisory title. The title is often specified in the ownerNode.

[DomName("title")]
string Title { get; }

Property Value

string

Type

Gets the style sheet language for this style sheet.

[DomName("type")]
string Type { get; }

Property Value

string

Methods

LocateNamespace(string)

Tries to find the matching namespace url for the given prefix.

string LocateNamespace(string prefix)

Parameters

prefix string

The prefix of the namespace to find.

Returns

string

The namespace assigned to the prefix, if any.

SetOwner(IElement)

Sets the owner of the sheet.

void SetOwner(IElement element)

Parameters

element IElement

The owning element.