Closed Fyren closed 6 months ago
Is parsing the tab name as wikitext reasonable? Is there any other reasonable way to style portions of the text?
It is possible to parse the tab name but it would cause performance issues that is not worth it if you want to style the text. You can always target the tab names with CSS since they all have unique id
attributes assigned.
I did specify potions of the name because they wanted to do something like foo {{color|1|bar}} baz
and not style the whole thing. Would passing the tab name to be parsed as wikitext have significant overhead compared to if the same text were just straight inside the article?
I will explore adding a config to allow wikitext parsing in tab header. There will be additional overhead but I don't have a measurement for now.
A wiki I contribute to color codes a lot of text using a template that wraps text in a
span
and uses the article path to pick between different colors. Specifically, if it helps explain, doing something like{{color|1|some text}}
where the1
is a color code will maybe color the given text red for the articleFoo/1
orFoo/2
but blue forBar/3
orBar/4
. A user wanted to use our template as part of a tab name, but TabberNeue doesn't pass the given value to be parsed and uses it as plain text.Is parsing the tab name as wikitext reasonable? I guess this would also allow things like putting images in the tab header, but I wouldn't be surprised if there'd be output that doesn't make sense to stick inside the HTML TabberNeue generates for the tabs.
Is there any other reasonable way to style portions of the text?