Skip to content

Commit

Permalink
Hide visibility:hidden and visibility:collapse elements
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Jun 21, 2024
1 parent 623e4b1 commit def4c90
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/blitz/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use style::{
},
};
use style::{
properties::generated::longhands::visibility::computed_value::T as StyloVisibility,
properties::{style_structs::Outline, ComputedValues},
values::{
computed::{
Expand Down Expand Up @@ -617,6 +618,17 @@ where
return;
}

// Hide elements with a visibility style other than visible
if element
.primary_styles()
.unwrap()
.get_inherited_box()
.visibility
!= StyloVisibility::Visible
{
return;
}

let cx = self.element_cx(element, location);
cx.stroke_effects(scene);
cx.stroke_outline(scene);
Expand Down

0 comments on commit def4c90

Please sign in to comment.