oxipdf-ir 0.1.0

Intermediate representation types for the oxipdf PDF engine
Documentation
//! Resolved style properties for IR nodes.
//!
//! A `ResolvedStyle` contains all style properties with concrete values —
//! the consumer is responsible for resolving inheritance and the cascade
//! before constructing the IR. Properties are organized into sub-structs
//! by concern.

pub mod flex;
pub mod fragmentation;
pub mod grid;
pub mod image;
pub mod layout;
pub mod list;
pub mod table;
pub mod transform;
pub mod typography;
pub mod visual;

pub use flex::*;
pub use fragmentation::*;
pub use grid::*;
pub use image::*;
pub use layout::*;
pub use list::*;
pub use table::*;
pub use transform::*;
pub use typography::*;
pub use visual::*;

/// The complete resolved style for an IR node.
///
/// All values are concrete: no `inherit`, `initial`, or `unset` keywords.
/// The consumer resolves these before building the `StyledTree`.
/// Percentages and `auto` values remain; they are resolved during layout
/// relative to the containing block.
///
/// Default values follow standard typographic and layout conventions
/// documented per IR version (§10.1).
#[derive(Debug, Clone, PartialEq, Default)]
pub struct ResolvedStyle {
    /// Box model and spatial positioning.
    pub layout: LayoutStyle,
    /// Flexbox-specific properties.
    pub flex: FlexStyle,
    /// CSS Grid-specific properties.
    pub grid: GridStyle,
    /// Typography and text rendering.
    pub typography: TypographyStyle,
    /// Visual decoration: backgrounds, borders, opacity.
    pub visual: VisualStyle,
    /// Pagination and fragmentation behavior.
    pub fragmentation: FragmentationStyle,
    /// Table cell properties (only relevant for cell content nodes).
    pub table: TableCellStyle,
    /// List item properties (marker type, position).
    pub list: ListStyle,
    /// Image rendering properties (object-fit, object-position).
    pub image: ImageStyle,
    /// 2D transform (translate, rotate, scale).
    pub transform: Option<Transform>,
}