Skip to content

Attach styles to nodes in HTML import #506

Description

@johno

HTML elements can have attached style strings that should be converted to the internal style object. This should be relatively straightforward, though we need to write a CSS => schema converter which also handles parsing/tokenizing the values in the style/CSS declarations.

There can also be style tags which have CSS. We'll need to attach those to the relevant nodes. This is quite a bit trickier since we'll need to effectively handle selectors and style resolution. One idea I have regarding this is to render the HTML somewhere in the background (after sanitizing) and then using getComputedStyle to attach the relevant styles.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions