Styling specific article/issue/book/chapter

,

Describe the issue or problem
The uploadable css file in ojs/omp apply style to an entire journal/press, but we would like to use it to syle a single article/issue/book/chapter.
We don’t want to edit/create templates/themes because our ojs/omp are in external hosting with the impossibility to directly manage themes/system files
We tried a lot of css selectors looking for a article/issue/book/chapter, but we didn’t find any structural solution.
Any hint?

Steps I took leading up to the issue
We needed to hide the DOI and chapters of this book because the final version is not ready but there is a postprint on Zenodo we need to point to from our omp.
We tried to use css selectors, but the maximum we obtained was:

  • for chapters, to hide all the chapters div in the press: it’s not a problem because is the only book with chapters in the press but if an other one will be released after the final version of this the solution will hide the chapters af both the books…
  • for the book DOI, to hide the tag only with the selector a[href=“https://doi.org/10.54103/consonanze.139”], but we couldn’t hide “DOI:” because we didn’t find any book-specific selector

What application are you using?
OJS and OMP 3.3.0-13

Additional information
We explored the possibility to use the has() CSS pseudo-class and we reached to use it to hide all the DOI div, but has() is not yet supportet by firefox and we are not sure could be used extensively, e.g. for hiding chapter of a single book
div.item.doi:has(span.value > a[href=“https://doi.org/10.54103/consonanze.139”]) { display:none; }

We also noticed that this problem is similar to the need in wordpress to style a single post (documented e.g. here), so we were wondering if there is something similar (an id for article/issue/book/chapter in a class) in ojs/omp or could be easily introduced/developed

Hi @bolelligallevi,

We used to have IDs like this in CSS classes in OJS 2.x, but fell out of the habit somewhere along the way. I’d welcome PRs to re-add this.

Regards,
Alec Smecher
Public Knowledge Project Team