pub struct BlockStyle {
pub role: String,
pub font_family: Option<PropertyValue>,
pub font_size: Option<PropertyValue>,
pub font_weight: Option<PropertyValue>,
pub fill: Option<PropertyValue>,
pub align: Option<String>,
pub italic: Option<bool>,
pub space_before: Option<Dimension>,
pub space_after: Option<Dimension>,
}Expand description
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.
Fields§
§role: StringThe block role this decl targets (e.g. "h1", "p", "blockquote").
font_family: Option<PropertyValue>Override font family (token ref or literal).
font_size: Option<PropertyValue>Override font size (token ref, pixel literal, or dimension ref).
font_weight: Option<PropertyValue>Override font weight (token ref or literal).
fill: Option<PropertyValue>Override text fill color (token ref or literal).
align: Option<String>Override text alignment: "left", "center", "right", "justify".
italic: Option<bool>Override italic rendering.
space_before: Option<Dimension>Extra space inserted above the block (resolved at compile time).
space_after: Option<Dimension>Extra space inserted below the block (resolved at compile time).
Trait Implementations§
Source§impl Clone for BlockStyle
impl Clone for BlockStyle
Source§fn clone(&self) -> BlockStyle
fn clone(&self) -> BlockStyle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BlockStyle
impl Debug for BlockStyle
Source§impl PartialEq for BlockStyle
impl PartialEq for BlockStyle
Source§fn eq(&self, other: &BlockStyle) -> bool
fn eq(&self, other: &BlockStyle) -> bool
self and other values to be equal, and is used by ==.