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

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

πŸ’– CSS::DOM::Rule::FontFace β€” bestie edition πŸ’–

okay so this is CSS::DOM::Rule::FontFace, a little module from the CSS::DOM family β€” specifically it's the CSS @font-face rule class for CSS::DOM. yes it's a Perl thing, no it's not scary, come sit with me 🫢


✨ VERSION ✨

Version 0.17 πŸ’…


🌸 SYNOPSIS 🌸

use CSS::DOM;
my $font_face_rule = CSS::DOM->parse(
    '@font-face { font-family: "bm"; src: url(blackmoor.ttf) }'
)->cssRules->[0];

$page_rule->style;        # a CSS::DOM::Style object
$page_rule->style->src;   # 'url(blackmoor.ttf)'

like. parse a whole @font-face block, grab the first rule off cssRules, and you're literally holding a font-face rule object. iconic behaviour honestly πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

This module implements CSS @font-face rules for CSS::DOM. It inherits from CSS::DOM::Rule and implements the CSSFontFaceRule DOM interface. that's the whole vibe β€” it's the glow-up wrapper that makes @font-face behave like a proper DOM citizen πŸ‘‘


πŸ’… THE METHOD πŸ’…

style

Returns the CSS::DOM::Style object representing the declaration block of this rule. it's giving "here's the actual font-y stuff inside the curly braces" ✨


πŸ”₯ SEE ALSO πŸ”₯

  • CSS::DOM β€” the parent universe, go there first bestie
  • CSS::DOM::Style β€” the declaration-block energy this method hands you
  • CSS::DOM::Rule β€” the base class this one inherits from, its whole ancestor situation

ngl, no cap, this one's tiny. one method. but she ate. πŸ’€πŸ’–

kisses and Perl, mwah πŸ§šβ€β™€οΈ β€” this page came out of perl v5.36.0 and was dated 2023-08-02, and yeah the header/footer kept insisting on calling it CSS::D...Charset(3pm) which is... a choice, but we love her anyway πŸŒˆπŸ’œ

πŸ“¦ where this page comes from