NAME

PDF::Make::Markup::Style - attributes, values and inheritance for the markup

SYNOPSIS

my $own    = PDF::Make::Markup::Style->attrs($node);
my $style  = PDF::Make::Markup::Style->inherit($parent_style, $own);
my $font   = PDF::Make::Markup::Style->font_args($style);

DESCRIPTION

One table describes every attribute: its type, whether children inherit it, and which tags accept it. The validator, the resolver and the reference documentation all read that table, so none of them can drift from the others.

Values

  • Lengths are points. A bare number, or one with pt; no other unit exists, because the engine has no notion of one.

  • Colours are #rgb, #rrggbb, or one of a short list of names (the HTML 4 sixteen, plus grey). Everything normalises to #rrggbb.

  • Booleans are 1/0, true/false, yes/no or on/off. Anything else is an error rather than a false.

  • align takes left, center (or centre) and right.

Inheritance

size, colour, font, bold, italic, line-height and align pass down. Box properties - pad, bg, border, weight, width, height, gap - do not: a cell's padding is the cell's, not that of every paragraph inside it.

Page size versus font size

size always means font size. A page is set with page-size on <doc> or <page>, so that one attribute name never means two things depending on where it appears.

SEE ALSO

PDF::Make::Markup::Parse, PDF::Make::Markup::Build