Widget talk:News

From Guild Wars 2 Wiki
Jump to navigationJump to search

Without css[edit]

Kvothe pointed out a cool bug that he observed due to my having switched the CSS off for Vector temporarily (rewriting more of its CSS later this week)- apparently if the #mainpagenews div is doesn't have a height set, then it accepts the height as zero and doesn't display anything. Maybe add a minimum? -Chieftain AlexUser Chieftain Alex sig.png 22:06, 21 March 2021 (UTC)

NB: Won't be visible now I've restored the CSS into vector. -Chieftain AlexUser Chieftain Alex sig.png 23:22, 21 March 2021 (UTC)
I'm not quite sure i understand what you mean. If i switch to the Vector skin it's displaying fine for me. There also already is a minimum of news that it will display regardless of the height that the parent node of the #mainpagenews div will assume. Could you maybe elaborate on what you are refering to, ideally in a way in which i can reproduce it? Nightsky (talk) 02:01, 22 March 2021 (UTC)
Before this edit the sections had no cell styling which resulted in "normal" sections one after the other (below each other) and by that the parent object had no size the widget could correspond to. —Kvothe (talk) 02:53, 22 March 2021 (UTC)
I see. I have to inform you both that this is not caused by the height not being defined. It's because of this that which i added of which i figured there has to be better; although i'm unfortunatelly not aware of how this could be done better. It's there to, as the edit description explains, wait for the css to load. That is for the Mobile.css (the Main Page styles therein) styles specifically, with the intention for them needing to be applied and the container propperly sized to the desiered height in order for the widget to read that value and try to not exceed it; except via min as introduced later. So effectively it's waiting for a, for the most part arbitrarily chosen (being after everything height influencing (as far as i could tell at the time) and also present in Monobook.css), display value of border-box. It's definetelly not perfect as sometimes it doesn't add as much as it could have, meaning that the loop likely must have not wait it loong enough for the height to be fully computed. I'm not aware of how it could be done better but i do verry much like to see it work propperly. If anyone knows how it could be done please be my guest and educate me. Nightsky (talk) 04:55, 22 March 2021 (UTC)