MediaWiki talk:FundraisingBanners/SmallPrint-2017
Add topicAppearance
Latest comment: 1 year ago by Jonesey95 in topic Edit request to fix Linter error
Edit request to fix Linter error
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please change the opening and closing span tags to div tags to resolve high-priority Linter errors that are caused when this page is transcluded, for example at MediaWiki:Centralnotice-template-mob p2 sm temp nagform1. There may be other ways to fix this error, but this one should work. In general, span tags, which are inline tags, cannot wrap block content. Here's the proposed replacement code:
<div class="frb-localize-links"><!-- MediaWiki:FundraisingBanners/LocalizeJS-2017.js will add country and language to links -->
<a href="https://donate.wikimedia.org/wiki/Special:LandingCheck?basic=true&landing_page=Problems_donating">{{{FR2015_translations,link-problems}}}</a> |
<a href="https://donate.wikimedia.org/wiki/Special:LandingCheck?basic=true&landing_page=Ways_to_Give">{{{FR2015_translations,link-otherways}}}</a> |
<a href="https://donate.wikimedia.org/wiki/Special:LandingCheck?basic=true&landing_page=FAQ">{{{FR2015_translations,link-faq}}}</a> |
<span class="frb-legal-nonUS">{{{FR2015_translations,legal-non-us}}}</span>
<span class="frb-legal-US" style="display: none;">{{{FR2015_translations,legal-us}}}</span>
<span class="frb-legal-NL" style="display: none;">{{{FR2015_translations,legal-nl}}}</span>
<span class="recurring-details">{{{FR2015_translations,recurring-details}}}</span>
</div>
Thanks. Jonesey95 (talk) 18:04, 26 April 2023 (UTC)
- Thank you @Jonesey95. Unless I'm missing something, all the child elements are also inline elements, so I'm not sure why the linter would complain? However I've changed the outer element to a div as requested, since it doesn't change the layout and also makes a bit more sense semantically. Peter Coombe (WMF) (talk) 15:38, 27 April 2023 (UTC)
- Thank you, Pcoombe (WMF). The elements are inline elements, but they are contained on multiple lines with line breaks between them, which (sometimes) turns the enclosed content into block content. I believe that another way to have fixed this problem would have been to remove the hard line breaks manually or add comment tags at the end and start of each line for better readability, but wrapping the block in a div seemed cleaner. Jonesey95 (talk) 17:04, 27 April 2023 (UTC)