HTML::O...t::Style(3)
π NAME π
Okay so this is HTML::O...t::Style(3) β User Contributed Perl Documentation, bestie β and it's all about HTML::Object::DOM::Element::Style, the HTML Object DOM Style Class. π
β¨ SYNOPSIS β¨
use HTML::Object::DOM::Element::Style;
my $style = HTML::Object::DOM::Element::Style->new ||
die( HTML::Object::DOM::Element::Style->error, "\n" );
πΈ VERSION πΈ
v0.2.0
π¦ DESCRIPTION π¦
This interface represents a "style" element. It inherits properties and methods from its parent, HTML::Object::DOM::Element. No cap, that's the whole vibe. π«Ά
π INHERITANCE π
The family tree goes hard, ngl:
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +-----------------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Style |
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +-----------------------------------+
π PROPERTIES π
Inherits properties from its parent HTML::Object::DOM::Element.
π disabled π
Is a boolean value reflecting the HTML attribute representing whether or not the stylesheet is disabled (true) or not (false).
See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLStyleElement/disabled
π media π
Is a string representing the intended destination medium for style information.
Example:
<!doctype html>
<html>
<head>
<link id="LinkedStyle" rel="stylesheet" href="document.css" type="text/css" media="screen" />
<style id="InlineStyle" rel="stylesheet" type="text/css" media="screen, print">
p { color: blue; }
</style>
</head>
<body>
</body>
</html>
say( 'LinkedStyle: ' . $doc->getElementById( 'LinkedStyle' )->media ); # 'screen'
say( 'InlineStyle: ' . $doc->getElementById( 'InlineStyle' )->media ); # 'screen, print'
Operators that can be used in the media value:
andβ Specifies an AND operator,(comma) β Specifies an OR operatornotβ Specifies a NOT operator
Device names (not enforced by this interface) that can be used in the media value:
allβ Suitable for all devices. This is the default.auralβ Speech synthesizersbrailleβ Braille feedback devices -- for the visually impairedhandheldβ Handheld devices with small screens and limited bandwidthprojectionβ Projector devicesprintβ Printed pages or in print-preview modescreenβ Computer screensttyβ Teletypes and similar devices using a fixed-pitch character gridtvβ Television type devices with low resolution and limited scrolling
Tokens that can be used in the media value:
aspect-ratio(width/height) β Ratio of width/height of the targeted display. Name can be prefixed withmin-ormax-.color(integer) β Bits per color of targeted display. Name can be prefixed withmin-ormax-.color-index(integer) β Number of colors the targeted display supports. Name can be prefixed withmin-ormax-.device-aspect-ratio(width/height) β Ratio of width/height of the device or paper. Name can be prefixed withmin-ormax-.device-height(pixels) β Height of the device or paper. Name can be prefixed withmin-ormax-.device-width(pixels) β Width of the device or paper. Name can be prefixed withmin-ormax-.grid(1 = grid, 0 = otherwise) β Whether output device is a grid or bitmap type.height(pixels) β Height of targeted display. Name can be prefixed withmin-ormax-.monochrome(integer) β Bits per pixel in a monochrome frame buffer. Name can be prefixed withmin-ormax-.orientation(landscape, portrait) β Orientation of the device or paper.resolution(dpi or dpcm) β Pixel density of the targeted display or paper. Name can be prefixed withmin-ormax-.scan(progressive interlace) β Scanning method of a tv display.width(pixels) β Width of targeted display. Name can be prefixed withmin-ormax-.
Example:
<style media="all and (orientation: portrait)"></style>
<style media="screen and (aspect-ratio: 16/10)"></style>
<style media="screen , (device-height: 540px)"></style>
<style media="screen , (aspect-ratio: 5/4)"></style>
<style media="screen and not (min-color-index: 512)"></style>
<style media="screen and (min-width: 1200px)"></style>
<style media="screen and (max-height: 720px)"></style>
<style media="handheld and (grid: 1)"></style>
<style media="tv and (scan: interlace)"></style>
<style media="print and (resolution: 400dpi)"></style>
<style media="screen and (max-monochrome: 2)"></style>
<style media="screen and not (device-width: 360px)"></style>
<style media="screen , (color: 8)"></style>
See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLStyleElement/media
π§ scoped π§
Is a boolean value indicating if the element applies to the whole document (false) or only to the parent's sub-tree (true).
See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLStyleElement/scoped
π sheet π
π«Ά Perl reality check, bestie: under perl, this always returns"undef", because processing a stylesheet would be time consuming, and an object is returned only when there is a"href"HTML attribute set.
Under JavaScript, this returns the CSSStyleSheet object associated with the given element, or "undef" if there is none.
See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLStyleElement/sheet
π type π
Is a string representing the type of style being applied by this statement.
Example:
if( $newStyle->type != "text/css" )
{
# not supported!
warnCSS();
}
See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLStyleElement/type
π₯ METHODS π₯
Inherits methods from its parent HTML::Object::DOM::Element.
β AUTHOR β
Jacques Deguest β jack@deguest.jp
π SEE ALSO π
Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLStyleElement
Mozilla documentation on style element: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style
π COPYRIGHT & LICENSE π
Copyright(c) 2021 DEGUEST Pte. Ltd.
All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
okay that's the whole page, bestie π source/version: perl v5.42.2 Β· date: 2026-02-15 Β· manual: HTML::O...t::Style(3). go style something iconic πβ¨
π¦ where this page comes from
- alpine 3.24: perl-html-object-doc 0.6.0-r1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms