CSS::D...::Style(3pm)

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

πŸ’– CSS::DOM::Rule::Style πŸ’–

okay so bestie, welcome to the manual page for CSS::DOM::Rule::Style β€” yes that's the whole name, the header up top just clipped it like a bad crop, no cap.


✨ NAME ✨

CSS::DOM::Rule::Style β€” it's the CSS style rule class for CSS::DOM. that's it, that's the vibe. πŸŽ€


🌸 VERSION 🌸

Version 0.17 β€” she's giving established, she's giving stable. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole little moment, verbatim, don't touch it:

use CSS::DOM;
my $ruleset = CSS::DOM->parse(
    'p:firstline, h3 { font-weight: bold }'
)->cssRules->[0];

$ruleset->selectorText;      # 'p:firstline, h3'
$ruleset->style;             # a CSS::DOM::Style object
$ruleset->style->fontWeight; # 'bold'

see how she parses a whole ruleset, pulls the first rule out of cssRules, reads back the selector text, grabs the style object, and then just casually reads fontWeight off it like it's nothing? main character energy fr fr. πŸ”₯


🌈 DESCRIPTION 🌈

so this module implements CSS style rules for CSS::DOM. she inherits from CSS::DOM::Rule, and she implements the CSSStyleRule DOM interface. that's the whole personality. iconic, honestly. πŸ‘‘


πŸ’… METHODS πŸ’…

πŸ’œ selectorText

returns a string representing the selector(s). and if you pass an argument? she sets it. she's flexible like that, we love a method with range. ✨

πŸ’œ style

returns the CSS::DOM::Style object that represents the declaration block of this rule. that's where all the actual styling lives, iykyk. πŸ“


πŸ”₯ SEE ALSO πŸ”₯

  • CSS::DOM
  • CSS::DOM::Style
  • CSS::DOM::Rule

go read those too bestie, they're all in the same friend group. 🫢


and that's the page!! this whole thing is perl v5.36.0 flavored, dated 2023-08-02, and it's part of the User Contributed Perl Documentation situation. mwah, go style something gorgeous. πŸ’–βœ¨

πŸ“¦ where this page comes from