[Bug]: Badly formatted SVG in the playground
@danieljcafonso 已经在做这个了。
开始于 2026年7月3日。
评估
这个 Issue 还没有评估数据。
描述
📝 Issue Description
The SVG provided in the JSX tutorial raises a linter error. If this is intentional, it's clever, but as-is, it's a bit confusing.
Here's the SVG provided:
<svg height="300" width="400">
<defs>
<linearGradient id="gr1" x1="0%" y1="60%" x2="100%" y2="0%">
<stop offset="5%" style="stop-color:rgb(255,255,3);stop-opacity:1" />
<stop offset="100%" style="stop-color:rgb(255,0,0);stop-opacity:1" />
</linearGradient>
</defs>
<ellipse cx="125" cy="150" rx="100" ry="60" fill="url(#gr1)" />
Sorry but this browser does not support inline SVG.
</svg>
This raises a linter error, https://snipboard.io/Djn564.jpg "Use an object for the style prop instead of a string.
eslint(solid/style-prop)". The preferred format is apparently style={{ "stop-color" : "rgb(255,255,3)", "stop-opacity" : "1" }}.
📋 On which page(s) it occurs
https://www.solidjs.com/tutorial/introduction_jsx
🤔 Expected Behavior
I expected the SVG to be to-par. I found it an interesting exercise to repair the SVG to linter standard. That being said, the linter error is non-obvious, and so may be inappropriate for an Introduction.
👀 Current Behavior
https://snipboard.io/Djn564.jpg
🖥️ Browser
Chrome 149.0.7827.114
📄 Additional Information
No response
- 主要语言
- MDX
- 星标
- 292
- 派生
- 361
- 平均合并
- 7 小时 51 分钟
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
solidjs/solid-docs 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
solidjs/solid-docs#1635 ·
-
good first issue solid solidstart
难度 2/5 1-3 小时 新手友好度 62/100
solidjs/solid-docs#1522 ·
-
pending review
solidjs/solid-docs#1637 · 已指派 1 人 ·
-
pending review
solidjs/solid-docs#1636 · 1 条评论 · 已指派 1 人 ·
-
难度 3/5 1-2 天 新手友好度 52/100
solidjs/solid-docs#1630 · 1 条评论 ·