CSS::D...e::List(3pm)
π CSS::DOM::Value::List β the CSSValueList glow-up π
okay bestie, so this is the manual page for CSS::DOM::Value::List(3pm), from the User Contributed Perl Documentation collection, and it's lowkey the whole personality of CSS list values. sit with me, we're doing this together π«Ά
β¨ NAME β¨
CSS::DOM::Value::List β the CSSValueList class for CSS::DOM, and yes she ate π
πΈ VERSION πΈ
Version 0.17. iconic, no notes.
π SYNOPSIS π
# ...
literally that's it, that's the whole synopsis, the author said "figure it out bestie" π
π¦ DESCRIPTION π¦
okay so. this module implements objects that represent CSS list property values. like, the whole vibe of a list-y CSS value? that's her. she implements the DOM CSSValueList interface, so she speaks fluent DOM.
you can get at the individual elements of the list two ways:
- using the
itemandlengthmethods, or - just using it as an array ref β¨
pick your fighter, both are valid.
π METHODS π
if you need the constructor, bestie, it's chilling down below the object methods. normally you would get an object via CSS::DOM::Style's getPropertyCSSValue method. that's the normal girl route.
π CSSValue Interface π
cssTextβ returns a string representation of the attribute. pass an argument and it sets it instead. two jobs, one method, we love a multi-hyphenate πcssValueTypeβ returnsCSS::DOM::Value::CSS_PRIMITIVE_VALUE. that's it. that's the whole answer. periodt.
π CSSValueList Interface π
itemβ returns the 'primitive' value at the given index. very "give me the one at position n" energy.lengthβ returns the number of values in the list. she's counting, she's keeping track, she's that girl.
π§ Constructor π§
you probably don't need to call this, but here it is anyway, because we don't gatekeep:
$val = new CSS::DOM::Value::List:: %args;
the hash-style arguments are as follows. only values is required β everything else is a little bonus β¨
valuesβ this must be an array ref containing the individual values to be stored in the list. the individual elements can be value objects or array refs of arguments to pass tonew CSS::DOM::Value::Primitive. E.g.,
[
[type => CSS_PX, value => 20],
[type => CSS_PERCENTAGE, value => 50],
[type => CSS_PERCENTAGE, value => 50],
[type => CSS_PX, value => 50],
]
cssβ CSS code used for serialisation. this will make readingcssTextfaster, at least until the value is modified. so like, a lil speed boost that expires, we've all been there πseparatorβ the value separator used in serialisation. this is usually' 'or', '. an empty string orundefis treated as a space. so if you pass nothing, you get a space, she's got a default and she's sticking to it.ownerβ the style object that owns this value; if this is omitted, then the value is read-only. and important detail: the value object holds a weak reference to the owner. noted, filed, remembered π₯propertyβ the name of the CSS property to which this value belongs.cssTextuses this to determine how to parse text passed to it. this does not apply to the sub-values of colours, counters and rects, but it does apply to individual elements of a list value. very specific, very important, write it down bestie π
π SEE ALSO π
go read these next, they're all connected, it's a whole cinematic universe:
CSS::DOMCSS::DOM::ValueCSS::DOM::Value::PrimitiveCSS::DOM::Style
and that's the page, bestie π this was CSS::DOM::Value::List, version 0.17, shipped under perl v5.36.0 and dated 2023-08-02 β a whole lil time capsule of list-value excellence. mwah, go write some CSS values, you're gonna slay πβ¨π¦
π¦ where this page comes from
- debian trixie: libcss-dom-perl 0.17-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcss-dom-perl 0.17-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcss-dom-perl 0.17-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcss-dom-perl 0.17-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms