PennController for IBEX › Forums › Bug Report › Inconsistent css behavior between reloads
- This topic has 5 replies, 2 voices, and was last updated 3 years, 4 months ago by Elise.
-
AuthorPosts
-
September 14, 2021 at 10:05 am #7254EliseParticipant
Hi Jeremy,
I have a weird bug occurring that sometimes the styles of my experiment are different. I noticed that the css_includes differs between those states which seems to be the only style file that is loaded. One time it is 1 kb in size and the other time it is 6 kb in size. It just occurred randomly when reloading and the source code hasn’t changed. So, I don’t think it is on my end. My hypothesis is that sometimes it only loads the predetermined global_main.css without the overwriting global_z.css file.
This is the link to my experiment: https://farm.pcibex.net/r/GFdVhN/experiment.html?test=true
I would appreciate any help!
Best,
EliseSeptember 14, 2021 at 10:18 am #7256JeremyKeymasterHi Elise,
Thanks for reporting this bug. You’re missing a closing
;
at line 47 of global_z.css, but I doubt this could be causing the bug you describe. I’ve been unable to reproduce the problem so far, unfortunatelyJeremy
September 14, 2021 at 10:33 am #7257EliseParticipantHi Jeremy,
Thanks for the fast reply! I added the semicolon, but I can still reproduce the bug after reloading a few times. I commented out the first instruction screens such that the different style is better visible: It is mainly about the position of the stimulus / html screens. Sometimes they are positioned higher than other times.
Best,
EliseSeptember 14, 2021 at 11:36 am #7258JeremyKeymasterI was able to reproduce the bug: sometimes global_z.css is loaded before global_main.css, sometimes it’s the other way around. I’ll have to fix things so it always serves the files in the same order. In the meantime, I invite you to place everything in global_main.css (adding a global_z.css file was only *necessary* on the old farms, where you couldn’t edit global_main.css)
Jeremy
September 14, 2021 at 11:54 am #7259EliseParticipantHi Jeremy,
I think I catched the error: It seems like sometimes what is defined in the global_main.css (e.g. the body tag) is executed before what is defined in the global_z.css (see https://pasteboard.co/4nkpZfZNQr1Z.png) and sometimes it is executed the other way around (see https://pasteboard.co/TCMgkkbP2CCa.png). I could solve the problem by making the tag more specific.
Best,
EliseSeptember 14, 2021 at 11:56 am #7260EliseParticipantJust saw your reply. Thank you so much! I’ll only create a single global_main.css, I didn’t know that the global_z.css is not necessary anymore.
Best,
Elise -
AuthorPosts
- You must be logged in to reply to this topic.