Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local battery template overrides experiment's style.css #70

Open
earcanal opened this issue Oct 13, 2017 · 12 comments
Open

Local battery template overrides experiment's style.css #70

earcanal opened this issue Oct 13, 2017 · 12 comments

Comments

@earcanal
Copy link

I'm not sure how the templates are generated, but the installed localbattery.html (2.5.47) contains:

<head>
    ...
    <link rel='stylesheet' href='static/css/default_style.css' type="text/css">
</head>

This refers to default_style.css after an experiment's style.css making it awkward to override styles (e.g. experiment background colour). As the canonical config.json includes default_style.css before style.css it looks like the reference in the template should be removed.

@vsoch
Copy link
Member

vsoch commented Oct 13, 2017

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?

@earcanal
Copy link
Author

Yeah, it's probably a better solution if the user style is the last thing in the template.

@vsoch
Copy link
Member

vsoch commented Oct 13, 2017

This sounds good to me. Would you like to PR with the change?

@earcanal
Copy link
Author

I would, but I can't figure out how that template is built.

@vsoch
Copy link
Member

vsoch commented Oct 13, 2017

@earcanal
Copy link
Author

How is that used to build localbattery.html?

@vsoch
Copy link
Member

vsoch commented Oct 13, 2017

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!

@earcanal
Copy link
Author

:) No worries. Might be easier for you to commit than process a PR for such a small change?

@vsoch
Copy link
Member

vsoch commented Oct 13, 2017

@earcanal
Copy link
Author

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).

@vsoch
Copy link
Member

vsoch commented Oct 13, 2017

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!

@earcanal
Copy link
Author

PR submitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants