WithBlockPattern#
- class penzai.treescope.foldable_representation.common_styles.WithBlockPattern[source]#
Bases:
DeferringToChild
A group that configures block color CSS variables.
This should be used around uses of PatternedTopLineSpanGroup, PatternedBottomLineSpanGroup, or PatternedSingleLineSpanGroup.
- Variables:
child (RenderableTreePart) – Contents of the group.
color (str) – CSS color for borders.
pattern (str) – CSS value for a background image pattern (e.g. using
repeating-linear-gradient
)
Inherited Attributes
collapsed_width
The length of this rendering if collapsed in one line, in characters.
newlines_in_expanded_parent
The number of newlines in this rendering if in an expanded parent.
tags_in_this_part
Returns a set of "tag" objects contained in this part.
Methods
__init__
(child, color, pattern)render_to_html
(stream, *[, at_beginning_of_line])Attributes
collapsed_width
The length of this rendering if collapsed in one line, in characters.
newlines_in_expanded_parent
The number of newlines in this rendering if in an expanded parent.
tags_in_this_part
Returns a set of "tag" objects contained in this part.
child
color
pattern
Inherited Methods
(expand to view inherited methods)
foldables_in_this_part
()html_setup_parts
(context, /)render_to_text
(stream, *, expanded_parent, ...)