#Inconsistency with whitespace in infoboxes

42 messages · Page 1 of 1 (latest)

night parcel
#

Hi!

We are struggling with a problem where infoboxes inconsistently ignore whitespace in their data parameters, and I cant figure out what the cause is, attached are some examples.

In the first, the date entry displays fine but the price entry refuses to acknowledge our space inbetween 45,000 and Bux.
In the second, all of the whitespace works eccept for in secondary main(s).

Any help would be appreciated!

brave stratus
#

Your first link leads to a non-existent page

night parcel
warped jungle
#

What is the link to the first image?

brave stratus
#

It actually doesn't seem to be inconsistent at all. It seem to do with having "raw" text, next to "non-raw" text (in most cases links, but also saw one place where the italicised text did it as well), makes it ignore the whitespace
The interesting thing is though, that if you look in the HTML via the browser inspector the whitespaces are there in the text, it is just not shown. So my guess would be something to do with margins or paddings or something like that in the CSS, though I haven't quite located where exactly it happens (and I frankly hate the CSS part of wiki'ing, so not sure how much time I am willing to spend on it personally here, but hopefully this should give you or someone else at least somewhere to start from).

warped jungle
#

I will give it a shot

#

I am not a css wizzkid either

brave stratus
#

Though one work around that may, or may not work in some of the cases, like the cost of XX Bux where you are making [[Bux]] as part of the input parameter, you could code the [[Bux]] into the template itself, using PI's <format></format> tag. Though not sure if it would affect this issue or not, I still think it would be better for consistency though at least, as the input require for the cost parameter when using the infobox would then just be the raw number

warped jungle
#

Or put an " " in there

warped jungle
#

And is Bux, the only currency used?

night parcel
#

one sec let me read

night parcel
#

it might be related to links now i think about it

#

https://phighting.miraheze.org/wiki/Skateboard/Skins here's a live example, dont mind the broken infobox it got busted when we migrated

PHIGHTING! WIKI

Skins are cosmetics that change a Phighter's physical appearance, ability effects, sounds, animations and dialogue. Skins are obtainable through various ways, given for free, being on the winning team in Phestivals, the top percentage of Phrenzies, or by finding an NPC in Crossroads who will trade you the skin for Bux.
In lore, many of the skins...

warped jungle
#

Do you have an estimate on how many pages this infobox is shown?

night parcel
#

it's going to be 14 pages current, 21 pages in the end

warped jungle
#

Ok. Not too bad

night parcel
#

yeah we've only got like 3 of them made right now for what its worth so fixing them shouldnt be too bad

#

there is only one edge case regarding the currency - during events where the skins are released, they are temporarily available for Bux and a unique event currency, but we might not put this in the infobox and just in the actual article text

#

once the event ends, they are given one bux price and left that way

warped jungle
#

Otherwise I would suggest that you do implement [Bux] in the template it self.
<data source="cost"><label>Cost</label>&nbsp;[[Bux]]</data>
The   forces a space

#

And remove [Bux] from the infobox on these pages where it is used

#

I'm not very good in these kinds of infoboxes, as I mostly work only with Wikicode

night parcel
#

youre okay! thank you so much for the help, ill liase with the editor working on these pages and try it out

warped jungle
#

But it would be the same principle

night parcel
#

i do wonder why this is happening though

#

the only thing i can think of is.. we have flexbox applied to infobox data

#

it might be causing this issue

#

OH

#

YEAH THATS IT lol

#

its treating the normal text and link as seperate items

warped jungle
#

😄 There you go 🙂

night parcel
#

flexbox 🤦

#

i think i can fix this by wrapping the data in <span> ?

#

since that forces flex to identify it as one element

warped jungle
#

Yes, but I think you know better than me how to do that in html code 😉

night parcel
#

haha true true

#

thanks for helping me figure it out! i wouldnt have realized it was flexbox's doing without you

warped jungle
#

Normally I would just put a {{nowrap|}}

#

You're welcome