Here's an initial stab of the approach described in #14 to improve image snapshots. Sharing here for visibility / comment.
While I think it makes sense in general, the main concern I have is that, in hiding all of the other elements on the page, you could potentially override an element's initial position styling.
I considered scoping down the hiding css to just body [data-ast-id] { display: none; } so that only elements that are part of the AST are hidden (and so you wouldn't have to "unhide" the ancestors and descendants of the target node, but this didn't seem to reliably hide all of the other elements on the page). Maybe there is a way to do this reliably, or there is a better approach to the hiding that I haven't thought of yet.
Here's an initial stab of the approach described in #14 to improve image snapshots. Sharing here for visibility / comment.
While I think it makes sense in general, the main concern I have is that, in hiding all of the other elements on the page, you could potentially override an element's initial
position
styling.I considered scoping down the hiding css to just
body [data-ast-id] { display: none; }
so that only elements that are part of the AST are hidden (and so you wouldn't have to "unhide" the ancestors and descendants of the target node, but this didn't seem to reliably hide all of the other elements on the page). Maybe there is a way to do this reliably, or there is a better approach to the hiding that I haven't thought of yet.