Documentation
¶
Overview ¶
Package ansifill keeps a painted background solid behind nested styles.
Lip Gloss applies a block background by emitting the background sequence at the start of a line and again around padding it adds itself. Any nested style inside the content ends with a reset, which also clears the block background, so every run of text after the first styled span renders on the terminal's default background instead of the modal surface. Re-applying the background after each SGR sequence closes those holes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Code ¶
Code returns the SGR sequence that sets the background to the given color value (any form Lip Gloss accepts). An empty value yields an empty code, which makes Lines a no-op.
func Lines ¶
Lines re-applies bgCode after every SGR sequence on every line so nested styles cannot punch holes in the surface behind text. When width is positive each line is also padded to that visual width with the background applied, which is what a host-owned chrome renderer needs: it pads short lines with unstyled spaces of its own otherwise.
Types ¶
This section is empty.