Skip to content

Element add cssstyle#666

Open
lichentao wants to merge 3 commits into
SVGKit:3.xfrom
lichentao:element_add_cssstyle
Open

Element add cssstyle#666
lichentao wants to merge 3 commits into
SVGKit:3.xfrom
lichentao:element_add_cssstyle

Conversation

@lichentao

Copy link
Copy Markdown

介绍: 通过给style注入css字符串与Element映射
使用方法:1.注入CssStyle样式中添加样式id 或者 class
2.给element vdom 标签设置 id/class

@adamgit adamgit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. SVGSVGElement does not extend SVGTransformable -- https://www.w3.org/TR/SVG11/struct.html#InterfaceSVGSVGElement -- that would break the spec

  2. styleHasRule is being continuously overwritten. Perhaps this line should be "styleHasRule = styleHasRule | [self ..." ?

  3. This appears to duplicate (improve?) the CSS code we already have. If this adds to the existing code, why is it in a new class instead of with the existing CSS classes?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants