-
Notifications
You must be signed in to change notification settings - Fork 27
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
Overriding html article css + child theme issue #16
Comments
@NateWr is probably best to answer this question. |
Hi @bricas, The override cascade only works for templates. That's because, in most cases, a child theme wants to extend scripts and styles rather than replace them entirely. If you want a child theme to replace a stylesheet in the parent theme, you should use removeStyle() + addStyle() or modifyStyle(). In this case, it looks like a different technique is used to load the style. @Vitaliy-1 may be able to suggest the best way to override this with your own. @Vitaliy-1, if you don't already have an overriding technique in mind for child themes, I'd recommend that we work to make the default stylesheet part of the Theme API. We should have methods like |
@NateWr, what about just passing additional argument through $args array with addStyle() method, e.g. array('galley' => '') |
I like that idea, @Vitaliy-1! What if we considered the HTML galleys a "context", alongside
|
Hey! Any thoughts about including this? I would be excited if that were the case. |
Yeah, I made a pull request yesterday, it is on review: pkp/pkp-lib#3691 |
Oh, rad! Thanks!
…On Tue, 11 Dec 2018 at 13:39, Vitaliy ***@***.***> wrote:
Yeah, I made a pull request yesterday, it is on review: pkp/pkp-lib#3691
<pkp/pkp-lib#3691>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#16 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAex1N3zr9owyiFMFnvlFHU7Sottbuyvks5u3-3EgaJpZM4YCcg_>
.
|
We have a large number of html files that span across many years. We have a stylesheet that works pretty well with ojs2 and were hoping to integrate some of those styles into the ojs3 classic theme article view.
I see on this line that a css file is dynamically injected:
https://github.com/pkp/classic/blob/master/templates/plugins/generic/htmlArticleGalley/display.tpl#L50
I've been told that a child theme would be the best way to integrate our changes. I would think that, according to that line of code, I could just have my own
/templates/plugins/generic/htmlArticleGalley/css/default.css
in the child theme it would just work.However, it would seem to me that if I didn't have that file, then it would not magically pick up the parent theme's version of that file.
If there are many files included this way, then all of those resources must be copied and synchronized to the child theme. It would seem to me that there should be some mechanism to get a file that travels back through each parent until it finds it.
I'm hoping someone can give some guidance with this issue.
Thanks in advance.
-Brian
The text was updated successfully, but these errors were encountered: