Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ dioxus-cli-config = { version = "0.7.3" }
dioxus-core-macro = { version = "0.7.3" }

# Taffy + Parley + Fontations
taffy = { git = "https://github.com/DioxusLabs/taffy", rev = "0e33e961c4ecd36a38d5103f57f305fbe37d749f", default-features = false, features = [
taffy = { git = "https://github.com/DioxusLabs/taffy", rev = "a0471381c63cd84622295f93a13b306034e392f4", default-features = false, features = [
"std",
"flexbox",
"grid",
Expand Down
10 changes: 9 additions & 1 deletion packages/blitz-dom/src/layout/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,11 @@ impl BaseDocument {
.lines()
.next()
.map(|line| (line.metrics().baseline / scale) + container_pb.top);
let last_baseline = inline_layout
.layout
.lines()
.next_back()
.map(|line| (line.metrics().baseline / scale) + container_pb.top);

// Put layout back
self.nodes[node_id]
Expand All @@ -839,7 +844,10 @@ impl BaseDocument {
bottom: content_extent.height,
}
},
baselines: taffy::Baselines::from_first(first_baseline),
baselines: taffy::Baselines {
first: first_baseline,
last: last_baseline,
},
top_margin: CollapsibleMarginSet::ZERO,
bottom_margin: CollapsibleMarginSet::ZERO,
margins_can_collapse_through: !has_styles_preventing_being_collapsed_through
Expand Down
4 changes: 1 addition & 3 deletions packages/stylo_taffy/src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,7 @@ pub fn item_alignment(input: stylo::AlignFlags, is_horiz_rtl: bool) -> Option<ta
stylo::AlignFlags::RIGHT => Some(taffy::AlignItems::END),
stylo::AlignFlags::CENTER => Some(taffy::AlignItems::CENTER),
stylo::AlignFlags::BASELINE => Some(taffy::AlignItems::BASELINE),
// Taffy does not support last-baseline alignment, so map it to its
// fallback alignment of `self-end` (https://www.w3.org/TR/css-align-3/#baseline-values)
stylo::AlignFlags::LAST_BASELINE => Some(taffy::AlignItems::END),
stylo::AlignFlags::LAST_BASELINE => Some(taffy::AlignItems::LAST_BASELINE),
// Should never be hit. But no real reason to panic here.
_ => None,
}?;
Expand Down
Loading