模板讨论:Nowrap
Jimmy Xu在话题“简化代码的编辑请求”中的最新留言:5年前
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)