Stylesheet
An RSS stylesheet
Attributes
| Attribute | Type | Description |
|---|---|---|
| url | string | The location of the stylesheet, converted from an IRI to a URI for use in the href attribute. |
| mimetype | string | The content type of the stylesheet, which is either manually specified or automatically guessed from the URL if left empty. |
| media | string = screen | The 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
| Name | Type | Description |
|---|---|---|
| url | string | The URL of the stylesheet. |
| mimetype | string | The MIME type of the stylesheet. |
| media | string = screen | The 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
| Type | Description |
|---|---|
string | The 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
| Type | Description |
|---|---|
string | The MIME type string, such as 'text/css'. |