Skip to main content

Stylesheet

An RSS stylesheet

Attributes

AttributeTypeDescription
urlstringThe location of the stylesheet, converted from an IRI to a URI for use in the href attribute.
mimetypestringThe content type of the stylesheet, which is either manually specified or automatically guessed from the URL if left empty.
mediastring = screenThe intended destination medium for the stylesheet, such as 'screen' or 'print', used in the media attribute.

Constructor

Signature

def Stylesheet(
url: string,
mimetype: string,
media: string = screen
) - > null

Parameters

NameTypeDescription
urlstringThe URL of the stylesheet.
mimetypestringThe MIME type of the stylesheet.
mediastring = screenThe media type for which the stylesheet is intended.

Methods


url()

@classmethod
def url() - > string

Returns the stylesheet URL as a URI, converting any Internationalized Resource Identifiers (IRIs) to URIs.

Returns

TypeDescription
stringThe URI-encoded URL of the stylesheet.

mimetype()

@classmethod
def mimetype() - > string

Retrieves the MIME type of the stylesheet, defaulting to a guessed type based on the URL if not explicitly provided.

Returns

TypeDescription
stringThe MIME type string, such as 'text/css'.