Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Does not parse style attribute #4

Open

Description

@wclr

Does not parse style attribute, stays as string. Which seem to be not valid.
Matt-Esch/virtual-dom#204

Activity

  1. changed the title [-]Does not parse style tag[/-] [+]Does not parse style attribute[/+] on Apr 10, 2016
  2. unframework commented on Apr 10, 2016

    @unframework
    Owner

    Thanks for reporting this, I can see that this breaks virtual-dom expectations. The solution would be to do a rudimentary CSS parse, convert property names to camelCase and output an object, I guess. This also makes me wonder about the class attribute (should it be converted to className?).

  3. wclr commented on Apr 10, 2016

    @wclr
    Author

    Well they maybe leaved in as is,
    so style="background-color: red" -> `"style": {"background-color": "red"}

    anyway your module is doing some kind of JSON (all the properties name have quotes), but it would be nice to have an option that it would create not json but js object like `style: {backgroundColor: "red"}

    as well it would be useful to have ability to have instead h("div.someclass", ...) -> div("someclass", ...)

  4. wclr commented on Apr 10, 2016

    @wclr
    Author

    btw it seem that better solution will be to place all the attributes to attributes this will solve other issues and this too.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions