Creating templates to format color and font on articles

Hello, everyone! I’ve noticed that formatting color and fonts on the wiki are currently using some CSS classes that need to be included in the articles of both Undertale and Deltarune wikis.

I wanted to suggest creating templates for these, in order to:

  • avoid having to include two types of syntaxes in the articles
  • to avoid having multiple ways to do the same thing - since you can use both <span class="yellow"> or <yellow>

My suggestion would be to make an template for color and one for fonts.

Something like {{color}} and {{font}}. So that you could use {{color|yellow|example text}} instead of <yellow>example text</yellow>. Or {{font|csans|My example}} instead of <span class="csans">My example</span>.

The syntax would be closer to everything else that the wiki uses, with the benefit of having the articles not break if the HTML syntax or CSS class needs to change for some reason. You can just update the template and everything is updated automatically.

Thoughts on this? I could create them and these could be displayed on the Manual of Style if there’s an agreement.

I specifically avoided creating templates like this because they make editing through VisualEditor much harder. <yellow>text</yellow> (which is only supported inside {{cite}} and {{quote}}, otherwise it'd be <span class="yellow">text</span>) is exactly as long as {{color|yellow|text}}. But the former displays as regular text in VisualEditor, and the latter displays as a template.

There is not much in terms of compatibility gains here. We already deprecated csans in favor of sans, and the only change we had to make was in this line. If this was done entirely within the template, the workaround would be slightly longer.

I guess that makes sense. Thanks for the response!

I wanna try