[go: nahoru, domu]

跳转到内容

Template talk: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)[回复]
@WinstonhyypiaI checked out your sandbox, the two templates look identical to me. 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)[回复]
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)[回复]
@WinstonhyypiaUpon 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日 (四) 04:10 (UTC)[回复]
@WinstonhyypiaIt 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 2017年4月27日 (四) 06:43 (UTC)[回复]
@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)[回复]

@星耀晨曦Kuailong我不明白為什麼是這樣修改,以及原本使用此模板的頁面就沒有此錯誤了,另外他說的模板應該是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)[回复]

完成。--Jimmy Xu 2018年12月3日 (一) 08:52 (UTC)[回复]