Skip to content

Reduce duplicated style information. #171

@tshead2

Description

@tshead2

Currently, every text element in a drawing duplicates its CSS state, now that we have taken over all text layout, but this is wasteful. We need to cut down on redundant CSS, without affecting users' ability to customize individual text elements.

Derived requirements:

  • We need to keep running track of a current CSS state while creating the DOM, much like a browser would do it.
  • toyplot.html._draw_text() should only write-out CSS properties that differ from the current state.
  • To get any benefit from this, code that renders a mark would need to insert "default" text styles into a parent element.

Ideally, this could cut-down on style overhead throughout a drawing, not just for text.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions