模板討論:Nowrap
Please help update this template
請求已處理
I added nowrap in template 英格蘭PFA足球先生 but it seems it is not working as expected. I checked the english wiki page and they changed
<span style="white-space:nowrap;">{{{1}}}</span>
to
<span class="nowrap">{{{1}}}</span>
and it seems working.
Thanks for the help. Winston(留言) 2017年4月24日 (一) 10:15 (UTC)
- white-space: nowrap is a legitimate CSS declaration, I see no point taking it off. So I simply added the class attribute and that should work for you if the inline CSS did not. Bluedeck 2017年4月26日 (三) 17:56 (UTC)
- @Bluedeck: The template is still not working as expected. Please feel free to check my Sandbox. In the sandbox I use nowrap template and <span class="nowrap"> for side-by-side comparison. Winston(留言) 2017年4月27日 (四) 00:36 (UTC)
- Here's a screenshot. I am suspecting this to be a browser-specific issue. Which browser do you use? Have you tried loading the page in some other browsers? Thank you. Bluedeck 2017年4月27日 (四) 00:54 (UTC) I checked out your sandbox, the two templates look identical to me.
- Feel free to use this --> User:Bluedeck/etc/sandbox/box1493254638632 for testing purposes. Inline CSS or class selector, either worked for me on Windows and Mac, with Chrome, Firefox and Safari. Bluedeck 2017年4月27日 (四) 01:01 (UTC)
- @Bluedeck: That was weird. I use Safari, Chrome and Firefox which gives me the same result. I can share you my screenshot. Please try going to my sandbox, changing the width of your browser (different browsers) and see. Winston(留言) 2017年4月27日 (四) 01:50 (UTC)
- Bluedeck 2017年4月27日 (四) 04:10 (UTC) Upon further inspection I'm not so sure what is going on here. For one I can reproduce the problem now (I couldn't before because I did not test it against a wider range of window widths). But then, using developer tools I found that there is no difference between the selector statement, which you suggest that we use, and the inline statement, which is what we're currently using. Both seem to do the same thing but the difference is definitly measurable, so there's a real issue here. I still cannot approve the exact changes that you requested, since the CSS selector is dependent on the skins that the users use. But I'll definitely go after whatever is going on here and hopefully come up with a fix.
- Bluedeck 2017年4月27日 (四) 06:43 (UTC) It turned out I had a typo in the class name, now that it's fixed, please clear the server cache of your sandbox and then you should be able to see it's working. You can clear the cache by clicking the edit tab of your sandbox, then save the page without actually doing any edits. Works for me. Please keep coming to me if you still have any questions. Thanks.
- @Bluedeck: Seems it works. Thanks. Winston(留言) 2017年4月27日 (四) 06:53 (UTC)
編輯請求
請求已拒絕
按照某WMF員工的留言,將模板的內容更改為:
<includeonly> <span class="nowrap" style="white-space:nowrap;">{{{1}}}</span> </includeonly><noinclude>{{Documentation}}</noinclude>
將會修復mw:Help:Extension:Linter/pwrap-bug-workaround的lint錯誤。 --꧁༺星耀晨曦༻꧂(留言) 2018年4月18日 (三) 00:16 (UTC)
- Template:nowrap begin而不是此模板。--Xiplus#Talk 2018年4月18日 (三) 00:35 (UTC) 我不明白為什麼是這樣修改,以及原本使用此模板的頁面就沒有此錯誤了,另外他說的模板應該是
- 是的,我也剛發現不是正確的模板。已回退。--Kuailong™ 2018年4月18日 (三) 00:36 (UTC)
- 那能否把Template:nowrap begin修改成
<includeonly> <span class="nowrap"> </includeonly><noinclude>{{Documentation}}</noinclude>
——꧁༺星耀晨曦༻꧂(留言) 2018年4月18日 (三) 00:40 (UTC)
- 未完成,關閉此請求,移至Template_talk:Nowrap_begin討論。--Xiplus#Talk 2018年4月22日 (日) 07:29 (UTC)
簡化代碼的編輯請求
請求已處理
現在 common.css 裡面已經包含相關的樣式了,所以我建議把源碼中的 white-space:nowrap
去掉,就像 {{nowrap begin}} 那樣。
--Great Brightstar(留言) 2018年11月28日 (三) 16:15 (UTC)