Fire Emblem Heroes Wiki:To-do list/Archived discussions

CSS

 * Move part of the inline styling in the news templates to MediaWiki:Common.css. Create new identifiers and classes to the extent that they can replicate the existing styles; matching the original CSS identifiers and classes is not necessary. This allows, for example, normal wikitext links to be properly styled without using Template:NewsWikilink. --HertzDevil (talk) 08:21, 22 August 2019 (UTC)
 * The problem with moving too much CSS to Common.css is that non-sysops cannot edit it. CSS should only be in Common.css if it is one of these: 1. It is not expected to be updated and is extremely widespread and prevalent on the wiki 2. It cannot be reproduced in wikitext. Endilyn (talk) 18:24, 23 August 2019 (UTC)
 * Template:NewsStyling is transcluded by >1400 pages and is definitely widespread and prevalent enough. It also rarely changes; most of the diffs on the CSS archive are related to cropped images which we do not reproduce with CSS.
 * Inline styles override CSS stylesheets, so Common.css can always be overridden.
 * The best of both worlds is to install the CSS parser function extension (it is in fact the only extension that the Dragalia Lost Gamepedia has and this wiki doesn't), though I am not sure if there are security concerns for allowing user CSS on every article. --HertzDevil (talk) 19:02, 23 August 2019 (UTC)
 * Sounds good. I don't think security concerns would be an issue, since the Dragalia Lost gamepedia seems to be doing fine and the creators of the extension would likely consider any problems. Endilyn (talk) 19:45, 23 August 2019 (UTC)
 * Hi all, wiki manager here. Endilyn requested I continue our Discord conversation here. I'm having trouble understanding what the use case for the CSS extension being enabled here is exactly. Can someone explain it? TheSatanicSanta (talk) 18:46, 2 September 2019 (UTC)
 * There are at least 2 concrete use cases I could think of:
 * Simulating column groups: Since MediaWiki does not support column groups, pages like Level 40 stats table currently use selectors such as  to add background colors to columns of table cells; these background colors have special meanings that apply only to the specific columns where they are used. Those CSS styles cannot be reused for other HTML elements, because adding or removing a column causes the colors to be applied to the incorrect columns (an example is   which duplicates the same styles but using different   arguments). At the minimum, templates / modules using those styles should be able to declare their own column indices; for example, CSS styles may be reused by transcluding a   template, with template parameters that control those column indices, instead of through the MediaWiki namespace CSS pages.
 * Storing unstyled text into Cargo: Suppose that Grand Hero Battle maps is to be automated; the description column should ideally pick up wikitext that is defined elsewhere (for example the last one comes from Grand Hero Battle - Death Knight: The Reaper (Notification)). At the moment it is not possible to store the description into Cargo and reuse it directly:since the NewsWikilink and NewsAccent use inline HTML styles and the descriptions on the table should not include any special styling. This can be resolved by using proper style cascasding so that the styles would only apply to descendants of, which is added by NewsStyling; the description would then be styled on the original page, while remaining unstyled on the maps table when queried from Cargo. However, as stated above, non-admin editors do not have edit rights to the CSS pages in the MediaWiki namespace, so new styled HTML elements cannot be added at will by those editors. The CSS extension solves exactly that. (It might be fine too if edit rights of the MediaWiki CSS pages are extended to the editors responsible for updating the notifications, but I am not sure if any extension does this or if Gamepedia lets this happen.)
 * In both cases the CSS extension also helps clean up MediaWiki:Hydra.css. --HertzDevil (talk) 09:45, 4 September 2019 (UTC)
 * I looked into it, and I'm afraid Gamepedia is currently trying to get rid of the CSS extension completely, so we're not adding it to any new wikis. TheSatanicSanta (talk) 00:24, 17 September 2019 (UTC)
 * It looks like widgets along with the element can be used to provide inline css. It is completely secure if we provide our own CSS for a widget. However, that may not be the case for a general style widget that allows any CSS to be provided as a parameter. It is true that there have been several css-related vulnerabilities, however these are mostly based on individual browser implementations and they are patched out later. Some real privacy concerns are the use of  to request an image, as this allows someone to set up a server and read requests to that server. This is the reason why the tag is not allowed in MediaWiki.   could also potentially be used to keylog passwords, however this is not possible here because logging in redirects to a seperate Special:UserLogin page. These issues seem minor, so I am in favor of a general style widget. Endilyn (talk) 04:44, 20 February 2020 (UTC)
 * The widget has been created at Widget:Style. Endilyn (talk) 07:59, 26 February 2020 (UTC)