Press.CSS.PageRule (press v0.1.0)

Copy Markdown View Source

A parsed @page { ... } rule, as produced by Press.CSS.Parser.parse/1.

Unlike Press.CSS.Rule, there is no selector or specificity — @page rules apply globally and the last one (in source/origin order) to set a given property wins outright. declarations["margin"], if present, is already expanded into a %{top:, right:, bottom:, left:} map (not split into separate keys the way Press.CSS.Rule splits margin) — see the design spec's "@page parsing" section for why.

Summary

Types

t()

A parsed @page rule struct.

Types

t()

@type t() :: %Press.CSS.PageRule{
  declarations: %{required(String.t()) => term()},
  source_index: non_neg_integer()
}

A parsed @page rule struct.