render: computed-style lite (inline + UA defaults)

Parse inline style attributes into the layout-relevant subset of
LayoutStyle: display, width/height, margin, padding, and border width,
including box shorthands (1-4 values) and per-side longhands. !important
is stripped; auto and percentages leave the size unset for phase 1.

Layered on a small built-in UA default sheet. A compact hand-rolled
tokenizer handles inline attributes without a cssparser dependency; a
real cascade can harden it later.
This commit is contained in:
SGavrl committed 2026-06-30 16:26:42 +00:00
1 parent 1971380da8
commit 5ed34ea8d4
2 files changed
+167

No files matched your search

+3
View File
@@ -13,6 +13,9 @@
use taffy::prelude::*;
mod style;
pub use style::compute_style;
/// An axis-aligned rectangle in CSS pixels, relative to the containing block.
#[derive(Debug, Clone, Copy, Default, PartialEq)]
pub struct Rect {