Skip to content

Fix nested primary child removal#16

Merged
nixonyh merged 3 commits intomainfrom
nixon/nested-style-deletion
Apr 27, 2026
Merged

Fix nested primary child removal#16
nixonyh merged 3 commits intomainfrom
nixon/nested-style-deletion

Conversation

@nixonyh
Copy link
Copy Markdown
Member

@nixonyh nixonyh commented Apr 27, 2026

Removing an element without a primary_style will leave a child element with primary_style untouched. This PR fixes that by moving the style deletion directly within Element::remove.

@nixonyh nixonyh requested a review from ian-hon April 27, 2026 13:55
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nixonyh nixonyh force-pushed the nixon/nested-style-deletion branch from bf3afbe to 2435f3b Compare April 27, 2026 14:02
@nixonyh nixonyh enabled auto-merge (squash) April 27, 2026 14:12
@nixonyh nixonyh added the bug Something isn't working label Apr 27, 2026
Comment thread crates/fynix/src/style.rs
/// `children[0]` is one depth deeper (inner scope).
/// `children[1]` is same depth, subsequent style node.
children: [Option<StyleId>; 2],
adjacent_child: Option<StyleId>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for updating the implementation to this

@nixonyh nixonyh merged commit 74c3578 into main Apr 27, 2026
7 checks passed
@nixonyh nixonyh deleted the nixon/nested-style-deletion branch April 27, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants