1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! `block role="…"` style declaration AST type.
//!
//! A `block` decl maps a markdown block role (h1–h6, p, blockquote, li,
//! code-block, hr) to a set of style and spacing properties. It is a
//! declaration child — NOT a renderable node — and may appear at three scopes:
//! document body, page, and text node. The cascade precedence is text > page >
//! document (highest specificity wins). Block decls are data-only in this
//! unit; the layout engine consumes them in a later unit.
use crate;
/// The recognized block-role vocabulary. Used by `zenith schema block` for
/// documentation and by the formatter for canonical KDL emission.
///
/// Values: h1, h2, h3, h4, h5, h6, p, blockquote, li, code-block, hr.
pub const BLOCK_ROLE_VOCAB: & = &;
/// Style + spacing declaration for a single markdown block role.
///
/// Declared as a `block role="h1" …` leaf child at document, page, or text
/// scope. All style fields are optional; absent fields fall through to the
/// next scope in the cascade (text > page > document) and ultimately to the
/// node-level default. An empty `block` decl (only `role` set) is valid and
/// simply acts as a noop override.