Open earcanal opened 6 years ago
Agreed, the user style needs to come first. We can't assume, however that the default_style.css
would be included by the user in the config.json. Would it suffice to just move around the ordering so user style takes preference?
Yeah, it's probably a better solution if the user style is the last thing in the template.
This sounds good to me. Would you like to PR with the change?
I would, but I can't figure out how that template is built.
I believe it's here:
https://github.com/expfactory/expfactory-battery/blob/master/templates/exp.html
How is that used to build localbattery.html
?
Ah apologies - it isn't! I think we want this one from the other repository:
https://github.com/expfactory/expfactory-python/blob/master/expfactory/templates/localbattery.html
Apologies, it's been a while!
:) No worries. Might be easier for you to commit than process a PR for such a small change?
good idea :)
All set : https://github.com/expfactory/expfactory-python/blob/master/expfactory/templates/localbattery.html
Give it a try!
Something not quite right with that. Looks like default_style.css
is being injected a bit too early (in relation to config.json
includes, which puts it after jspsych.css
).
I haven't worked on this project in years, and I'm trying to help out because my colleagues are silent. If you would be able to, it would be great for you to test this and do a PR since others will likely have the same trouble. Thanks!
PR submitted.
I'm not sure how the templates are generated, but the installed
localbattery.html
(2.5.47) contains:This refers to
default_style.css
after an experiment'sstyle.css
making it awkward to override styles (e.g. experiment background colour). As the canonicalconfig.json
includesdefault_style.css
beforestyle.css
it looks like the reference in the template should be removed.