render: real-world CSS rendering parity
Colors: oklch()/oklab() and color-mix(); linear-gradient backgrounds. Grid: named-line placement, repeat() expansion, drop whitespace-only grid items; upgrade taffy 0.7 -> 0.12 so aspect-ratio images in auto-height rows no longer collapse to slivers. CSS: @layer, nesting, @property, :is()/:where(), clamp(), @media not all; source/track/param/area and svg desc/metadata as display:none. Images: webp + intrinsic sizing, srcset/picture, browser UA + Accept for CDN fetches, grey placeholder on failure; width/height HTML attributes rank below author CSS with aspect-ratio preserved for auto axes.
This commit is contained in:
1 parent
88313178b2
commit
2652ee64a4
17 files changed
+4482
-368
No files matched your search
@@ -8,16 +8,21 @@ description = "Optional scoped render layer for Obscura: layout (taffy) and, wit
|
||||
|
||||
[features]
|
||||
default = []
|
||||
# Rasterize the laid-out tree to a pixmap (tiny-skia) with text (ab_glyph) and images.
|
||||
# Rasterize the laid-out tree to a pixmap (tiny-skia) with text (cosmic-text
|
||||
# shaping + line breaking, ab_glyph fallback) and images.
|
||||
# Off by default; the layout core (getBoundingClientRect etc.) works without it.
|
||||
paint = ["dep:tiny-skia", "dep:ab_glyph", "dep:image", "dep:ureq", "dep:base64", "dep:resvg", "dep:usvg", "dep:url"]
|
||||
paint = ["dep:tiny-skia", "dep:ab_glyph", "dep:cosmic-text", "dep:image", "dep:ureq", "dep:base64", "dep:resvg", "dep:usvg", "dep:url"]
|
||||
|
||||
[dependencies]
|
||||
taffy = { workspace = true }
|
||||
obscura-dom = { workspace = true }
|
||||
tiny-skia = { workspace = true, optional = true }
|
||||
ab_glyph = { workspace = true, optional = true }
|
||||
image = { version = "0.24", default-features = false, features = ["jpeg", "png", "webp"], optional = true }
|
||||
# Real inline text layout: HarfBuzz-class shaping (rustybuzz) + UAX#14 line
|
||||
# breaking, the same algorithms browsers use. Built with only our embedded
|
||||
# fonts (no system-font scan) so layout stays deterministic across hosts.
|
||||
cosmic-text = { version = "=0.12.1", default-features = false, features = ["std", "swash"], optional = true }
|
||||
image = { version = "0.25", default-features = false, features = ["jpeg", "png", "webp"], optional = true }
|
||||
ureq = { version = "2.9", default-features = false, features = ["tls"], optional = true }
|
||||
base64 = { workspace = true, optional = true }
|
||||
# SVG rasterization for <img src="*.svg">, inline <svg>, and background-image
|
||||
|
||||
Reference in new issue
Block a user