CSS::Style(3pm)

πŸ“¦
version 1.09 Β· 4 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

✨ CSS::Style ✨

okay so bestie, welcome to CSS::Style β€” it's a ruleset in a CSS object tree πŸ’– and yes it lives in the User Contributed Perl Documentation corner of your man pages, we love a humble icon.


🌸 NAME 🌸

CSS::Style β€” a ruleset in a CSS object tree πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

use CSS;

that's it. that's the whole vibe. go off πŸ’…


✨ DESCRIPTION ✨

so like, this module represents a ruleset in a CSS object tree 🌳 it's giving "one block of CSS, but as a whole lil object."

if you wanna know how the whole CSS object tree fits together, go read the CSS.pm pod β€” it's the lore, iykyk πŸ“–


πŸ’… METHODS πŸ’…

πŸŽ€ CONSTRUCTORS πŸŽ€

  • new() or new( { ..options.. } ) β€” this constructor hands you back a brand new CSS::Style object 🫢 and you can optionally pass it a hash of options, which are:
    • adaptor β€” the adaptor to use for serialization ✨

πŸ‘‘ ACCESSORS πŸ‘‘

  • add_selector( $selector ) β€” this one adds a selector to the selector list for the object. $selector is a reference to a CSS::Selector object πŸ¦‹
  • add_property( $property ) β€” this adds a selector to the property list for the object (ngl the pod literally says "selector" here and it's lowkey a typo situation, but we report it faithfully β€” the point is it's adding to the property list). $property is a reference to a CSS::Property object πŸ’œ
  • set_adaptor( 'CSS::Adaptor::Foo' ) β€” sets the current adaptor for the object. the main character gets to pick their own translator ✨
  • selectors() β€” serializes the ruleset's selectors using the current adaptor 🌈 it returns a string, and that string comes from the adaptor's output_selectors() method.
  • properties() β€” serializes the ruleset's properties using the current adaptor πŸ’– it returns a string, and that string comes from the adaptor's output_properties() method.
  • to_string() β€” serializes the whole entire ruleset using the current adaptor πŸ”₯ it returns a string which comes from the adaptor's output_rules() method. the full look, head to toe.
  • get_property_by_name( 'property_name' ) β€” returns the first CSS::Property object with the specified name πŸ‘€ and returns zero on failure. no property, no problem, just a zero bestie.

πŸ’– AUTHOR πŸ’–

Copyright (C) 2003-2004, Cal Henderson <cal@iamcal.com> πŸ‘‘


🌟 SEE ALSO 🌟


and that's the whole page, periodt πŸŽ€ this was CSS::Style, served up by perl v5.32.0, dated 2020-12-29 β€” thanks for coming to my ted talk, mwah πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from