CSS::Ob...Property(3)

πŸ“¦ version 0.2.0, in alpine 3.24

okay bestie, welcome to the CSS::Ob...Property(3) page from the User Contributed Perl Documentation β€” it's giving CSS::Object::Property realness, and we're about to make CSS properties make sense. πŸ’…βœ¨

✨ NAME ✨

CSS::Object::Property β€” CSS Object Oriented Property. literally the class that reps a CSS property. iconic.

πŸŽ€ SYNOPSIS πŸŽ€

use CSS::Object::Property;
my $prop = CSS::Object::Property->new(
    name => 'display',
    value => 'inline-block',
    format => $format_object,
    debug => 3,
) || die( CSS::Object::Property->error );

🌈 VERSION 🌈

v0.2.0 β€” that's the version, periodt. 🫢

πŸ’– DESCRIPTION πŸ’–

CSS::Object::Property is a class that represents a CSS property. no cap, that's the whole vibe. 🌸

🧚 CONSTRUCTOR 🧚

πŸ“ new

to instantiate a new CSS::Object::Property object, pass in a hash reference with these parameters:

  • debug β€” this is an integer. the bigger it is, the more verbose the output gets. πŸ”₯
  • format β€” this is a CSS::Object::Format object or one of its child modules.
  • name β€” this is the property's name. when provided, it calls the method name to store the value.
  • value β€” this is the property's name. when provided, it calls the method value to store the value. (yes, bestie, the page says "name" here too β€” I'm just reporting the lore. πŸ™ˆ)

πŸ’… METHODS πŸ’…

πŸ¦‹ format

this is a CSS::Object::Format object or one of its child modules. simple as that. ✨

⭐ as_string

this calls the format and its method property_as_string in CSS::Object::Format.

it returns the css string produced, or undef, and sets an Module::Generic::Exception upon error. 😭

🧸 format (the setter/getter one)

this sets or gets the CSS::Object::Format object. when it's set, this will share the formatter with all its CSS::Object::Value objects. bestie behavior. 🫢

πŸ‘‘ name

sets or gets the property's name. the name stored here becomes a Module::Generic::Scalar, and thus all its object methods can be used. slay. πŸ’…

πŸŽ€ remove_from

this takes an CSS::Object::Rule object as a single argument and removes this property object from its list of elements.

it basically does:

$rule->elements->remove( $self );

it returns the current property object. πŸ¦‹

πŸ”₯ value

sets the value or gets the last value for this property.

it takes either a string or a CSS::Object::Value object and adds it to the list of stored values for this property using the properties method.

it returns the last property value object in the values array. πŸ’–

🌸 values

this sets or gets the list of CSS::Object::Value objects. it uses a Module::Generic::Array object to store those value objects.

it returns the array object. πŸŽ€

🧚 values_as_string

this returns a string representation of all the CSS::Object::Value objects currently stored. it does this by calling the format's method values_as_string in CSS::Object::Format. periodt. ✨

🌟 AUTHOR 🌟

Jacques Deguest <jack@deguest.jp> β€” the icon behind it all. πŸ‘‘

πŸ”— SEE ALSO πŸ”—

CSS::Object β€” go look, iykyk. πŸ¦‹

Copyright (c) 2020 DEGUEST Pte. Ltd.

you can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself. fr fr. 🌈


and that's the whole page, bestie πŸ«ΆπŸ’– β€” brought to you by perl v5.42.2, dated 2026-02-15, and filed under CSS::Ob...Property(3). bye! πŸ’…βœ¨

πŸ“¦ where this page comes from