HTML::O...t::Style(3)

πŸ“¦ version 0.6.0, in alpine 3.24

πŸ’– 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 operator
  • not β€” 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 synthesizers
  • braille β€” Braille feedback devices -- for the visually impaired
  • handheld β€” Handheld devices with small screens and limited bandwidth
  • projection β€” Projector devices
  • print β€” Printed pages or in print-preview mode
  • screen β€” Computer screens
  • tty β€” Teletypes and similar devices using a fixed-pitch character grid
  • tv β€” 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 with min- or max-.
  • color (integer) β€” Bits per color of targeted display. Name can be prefixed with min- or max-.
  • color-index (integer) β€” Number of colors the targeted display supports. Name can be prefixed with min- or max-.
  • device-aspect-ratio (width/height) β€” Ratio of width/height of the device or paper. Name can be prefixed with min- or max-.
  • device-height (pixels) β€” Height of the device or paper. Name can be prefixed with min- or max-.
  • device-width (pixels) β€” Width of the device or paper. Name can be prefixed with min- or max-.
  • grid (1 = grid, 0 = otherwise) β€” Whether output device is a grid or bitmap type.
  • height (pixels) β€” Height of targeted display. Name can be prefixed with min- or max-.
  • monochrome (integer) β€” Bits per pixel in a monochrome frame buffer. Name can be prefixed with min- or max-.
  • 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 with min- or max-.
  • scan (progressive interlace) β€” Scanning method of a tv display.
  • width (pixels) β€” Width of targeted display. Name can be prefixed with min- or max-.

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(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