====== 開發 fieldset plugin ======
覺得
(應該要用一般瀏覽器常見的 style,legend 的文字在邊線左上角),而不是用各 DW tpl 自己的樣式),但當然不可能每次都打一堆 HTML 碼:
考慮兩種解法:
* 做專屬的 syntax plugin
* 用 wrap div/span + CSS
===== plugin =====
因為不同的 DW tpl 各有不同的 fieldset、legend CSS,所以本來我想就不做 plugin 了,用下面的純 wrap+CSS 法就好。但後來又想,我也可以弄 plugin,但產生 ''div.fieldset'' 之類的啊。所以就再次來挑戰看看 syntax plugin 吧(雖然之前從來沒成功)。
- 試著用 [[doku>plugin:ruby]] 來改
- 開 repo
- 其實語法有頭有尾 ∴也應該參考 wrap 才是 ← 想到就難,先休息好了 <<哈>>
==== 參考 ====
* [[https://www.dokuwiki.org/devel:syntax_plugin_skeleton|devel:syntax_plugin_skeleton [DokuWiki]]]
===== CSS =====
一般瀏覽器常見的 legend style 到底是怎樣?
* [[https://html.spec.whatwg.org/multipage/rendering.html#the-fieldset-and-legend-elements|HTML Standard]] 這裡面的 CSS 似乎不是,至少在 BlueGriffon 裡套到 ''div.fieldset''、''div.legend'' 上的話還是無法呈現我要的效果
* 用 Waterfox 網頁開發者工具挖出 fieldset 及 legend 的「瀏覽器樣式」,再套到測試的網頁 CSS 裡,也無效
擬真:
* [[https://stackoverflow.com/questions/2213881/is-it-possible-to-achieve-a-fieldset-like-effect-without-using-the-fieldset#answer-2214676|html - Is it possible to achieve a