CSS::DOM::Value(3pm)

πŸ“¦
version 0.17 Β· 5 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ CSS::DOM::Value ✨

okay so bestie, welcome to CSS::DOM::Value β€” that's the CSSValue class for CSS::DOM, aka the little legend that holds your CSS property values πŸ’… it's a Perl thing, and yes, it lives in the User Contributed Perl Documentation corner of the manual (the 3pm girlies know) πŸŽ€


πŸ’– VERSION πŸ’–

Version 0.17 β€” she's serving, she's stable, she's that girl ✨


🌸 SYNOPSIS 🌸

# ...

no cap, that's literally the whole synopsis. the vibe is implied πŸ¦‹


πŸ‘‘ DESCRIPTION πŸ‘‘

So basically: this module implements objects that represent CSS property values. It implements the DOM CSSValue interface. Periodt. πŸ’…

Here's the tea though β€” this class is used only for custom values (so like, neither primitive values nor lists, bestie, read it again) and the special 'inherit' value. That's the whole guest list. Not everybody gets in. πŸ™ˆ


🫢 METHODS 🫢

🧚 Object Methods

  • cssText β€” returns a string representation of the attribute. And if you pass an argument? It sets it. Lowkey does both. Iconic behaviour honestly πŸ’–
  • cssValueType β€” returns one of the constants down below ⬇️ go look, they're cute.

🌈 Constructor

You probably don't need to call this, but here it is anyway, because I'm generous:

$val = new CSS::DOM::Value %arguments;

The hash-style %arguments are as follows, bestie, take notes πŸ“:

  • type β€” "CSS_INHERIT" or "CSS_CUSTOM". Pick one. Those are the options. πŸ’«
  • css β€” A string of CSS code. This is only used when "TYPE" is "CSS_CUSTOM". So like, don't bother otherwise, fr fr.
  • owner β€” The style object that owns this value; if this is omitted, then the value is read-only. Also important: the value object holds a weak reference to the owner. She does not cling. She is secure. πŸ’…
  • property β€” The name of the CSS property to which this value belongs. "cssText" uses this to determine how to parse text passed to it. So it's the translator, basically. πŸ—£οΈ

⭐ CONSTANTS ⭐

The following constants can be imported with use CSS::DOM::Value ':all'. They represent the type of CSS value. Slay, enumerated queen πŸ‘‘

  • CSS_INHERIT (0)
  • CSS_PRIMITIVE_VALUE (1)
  • CSS_VALUE_LIST (2)
  • CSS_CUSTOM (3)

πŸ’œ SEE ALSO πŸ’œ

go read these next, they're the friend group:

  • CSS::DOM
  • CSS::DOM::Value::Primitive
  • CSS::DOM::Value::List
  • CSS::DOM::Style

and that's the whole page, bestie!! πŸŽ€ this was CSS::DOM::Value, page 3pm, brought to you by the User Contributed Perl Documentation girlies, running on perl v5.36.0, dated 2023-08-02. mwah, take care of her, she's precious πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from