PageBox

[Raku CSS Project] / [CSS-Properties] / CSS::PageBox

class CSS::PageBox

Outer CSS Page Box

Synopsis

use CSS::PageBox;
use CSS::Units :mm;
use CSS::Properties;

my $style = q:to"END";
     size:a4 landscape;
     border:2mm;
     margin:3mm;
     padding:5mm;
    END

my CSS::Properties $css .= new: :$style;

my CSS::PageBox $box .= new: :$css, :units<mm>;
say $box.margin;  # [297, 210, 0, 0]
say $box.border;  # [294, 207, 3, 3]
say $box.padding; # [292, 205, 5, 5]
say $box.content; # [287, 200, 10, 10]

Description

CSS::PageBox is a sub-class of CSS::Box. It is capable of interepeting and setting up a page from a @page at-rule properties, including size, border, and padding properties.

CSS::Properties v0.8.1

CSS property manipulation library

Authors

  • David Warring

License

Artistic-2.0

Dependencies

CSS::Module:ver<0.5.9+>CSS::Writer:ver<0.2.8+>ColorMethod::Also

Test Dependencies

Provides

  • CSS::Box
  • CSS::Font
  • CSS::Font::Descriptor
  • CSS::Font::Pattern
  • CSS::PageBox
  • CSS::Properties
  • CSS::Properties::Calculator
  • CSS::Properties::Font
  • CSS::Properties::Optimizer
  • CSS::Properties::Property
  • CSS::Units

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.