HtmlContextForSetup

HtmlContextForSetup#

class penzai.treescope.foldable_representation.part_interface.HtmlContextForSetup[source]#

Bases: object

Configuration variables necessary for setting up rendering.

Variables:
  • collapsed_selector (str) – A CSS selector that will match any collapsed ancestor of this node. A node can apply styles when in a collapsed parent by using this as a prefix in the CSS selector.

  • roundtrip_selector (str) – A CSS selector that will match an ancestor of this node whenever rendering in roundtrip mode.

  • hyperlink_hover_selector (str) – A CSS selector that will match nodes when they are the target of a hyperlink the viewer is hovering their mouse over.

  • hyperlink_clicked_selector (str) – A CSS selector that will match nodes that are the target of a hyperlink the viewer has recently clicked.

  • hyperlink_clicked_tick_selector (str) – Like hyperlink_clicked_selector, but only matches for a single “tick” of rendering. Can be used in combination with CSS transitions to animate when clicked.

  • hyperlink_target_selector (str) – A CSS selector that matches any node that could be the target of a hyperlink, even if it isn’t currently being hovered or clicked. Can be used in combination with the above selectors to filter out descendants of the currently active hyperlink target.

Methods

__init__(collapsed_selector, ...)

Attributes

collapsed_selector

roundtrip_selector

hyperlink_hover_selector

hyperlink_clicked_selector

hyperlink_clicked_tick_selector

hyperlink_target_selector