Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
fix(Themes): Clean up common styles, eLife, Nature, Plos, Stencila th…
Browse files Browse the repository at this point in the history
…emes

- Fix regressions for Stencila + PLoS themes when viewing converted-article.html (real article example)
- Update to work with new schema API route
  • Loading branch information
jwijay committed Aug 30, 2019
1 parent 446794e commit 3ac0897
Show file tree
Hide file tree
Showing 5 changed files with 322 additions and 457 deletions.
14 changes: 10 additions & 4 deletions src/common/styles/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
@import 'prismjs/plugins/line-numbers/prism-line-numbers.css';

/* Custom Selectors */
@custom-selector :--CiteGroup [itemtype='https://stencila.github.io/schema/CiteGroup'];
@custom-selector :--Cite [itemtype='https://stencila.github.io/schema/Cite'];
@custom-selector :--CiteGroup [itemtype='https://schema.stenci.la/CiteGroup'];
@custom-selector :--Cite [itemtype='https://schema.stenci.la/Cite'];
@custom-selector :--CreativeWork [itemtype='https://schema.org/CreativeWork'];
@custom-selector :--title [itemprop='title'];
@custom-selector :--authors [itemprop='authors'];
@custom-selector :--Person [itemtype='https://schema.org/Person'];
@custom-selector :--references [itemprop='references'];
@custom-selector :--PublicationIssue [itemtype='https://stencila.github.io/schema/PublicationIssue'];
@custom-selector :--PublicationIssue [itemtype='https://schema.stenci.la/PublicationIssue'];
@custom-selector :--datePublished [itemprop='datePublished'];
@custom-selector :--issueNumber [itemprop='issueNumber'];
@custom-selector :--pagination [itemprop='pagination'];
Expand All @@ -19,7 +19,6 @@
@custom-selector :--authorDetails [itemprop='authorDetails'];

/* Citation Styles */
@custom-selector :--citation-style-eLife [data-citation-style='eLife'];
@custom-selector :--citation-style-MLA [data-citation-style='MLA'];
@custom-selector :--citation-style-APA [data-citation-style='APA'];

Expand Down Expand Up @@ -130,6 +129,13 @@ html {
}

:--PublicationIssue {
:--title {
&::after {
content: ' ';
white-space: pre;
}
}

+ :--datePublished {
display: none;
}
Expand Down
11 changes: 3 additions & 8 deletions src/themes/eLife/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,21 @@
@import '../../common/fonts/notoSans/notoSans.css';

/* Custom Selectors */
@custom-selector :--CiteGroup [itemtype='https://stencila.github.io/schema/CiteGroup'];
@custom-selector :--Cite [itemtype='https://stencila.github.io/schema/Cite'];
@custom-selector :--CiteGroup [itemtype='https://schema.stenci.la/CiteGroup'];
@custom-selector :--Cite [itemtype='https://schema.stenci.la/Cite'];
@custom-selector :--CreativeWork [itemtype='https://schema.org/CreativeWork'];
@custom-selector :--title [itemprop='title'];
@custom-selector :--authors [itemprop='authors'];
@custom-selector :--Person [itemtype='https://schema.org/Person'];
@custom-selector :--references [itemprop='references'];
@custom-selector :--PublicationIssue [itemtype='https://stencila.github.io/schema/PublicationIssue'];
@custom-selector :--PublicationIssue [itemtype='https://schema.stenci.la/PublicationIssue'];
@custom-selector :--datePublished [itemprop='datePublished'];
@custom-selector :--issueNumber [itemprop='issueNumber'];
@custom-selector :--pagination [itemprop='pagination'];
@custom-selector :--url [itemprop='url'];
@custom-selector :--abstracts [itemprop='abstracts'];
@custom-selector :--authorDetails [itemprop='authorDetails'];

/* Citation Styles */
@custom-selector :--citation-style-eLife [data-citation-style='eLife'];
@custom-selector :--citation-style-MLA [data-citation-style='MLA'];
@custom-selector :--citation-style-APA [data-citation-style='APA'];

:root {
--max-width: 650px;
--max-width-media: 980px;
Expand Down
11 changes: 3 additions & 8 deletions src/themes/nature/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,21 @@
@import '../../common/fonts/sourceSansPro/sourceSansPro.css';

/* Custom Selectors */
@custom-selector :--CiteGroup [itemtype='https://stencila.github.io/schema/CiteGroup'];
@custom-selector :--Cite [itemtype='https://stencila.github.io/schema/Cite'];
@custom-selector :--CiteGroup [itemtype='https://schema.stenci.la/CiteGroup'];
@custom-selector :--Cite [itemtype='https://schema.stenci.la/Cite'];
@custom-selector :--CreativeWork [itemtype='https://schema.org/CreativeWork'];
@custom-selector :--title [itemprop='title'];
@custom-selector :--authors [itemprop='authors'];
@custom-selector :--Person [itemtype='https://schema.org/Person'];
@custom-selector :--references [itemprop='references'];
@custom-selector :--PublicationIssue [itemtype='https://stencila.github.io/schema/PublicationIssue'];
@custom-selector :--PublicationIssue [itemtype='https://schema.stenci.la/PublicationIssue'];
@custom-selector :--datePublished [itemprop='datePublished'];
@custom-selector :--issueNumber [itemprop='issueNumber'];
@custom-selector :--pagination [itemprop='pagination'];
@custom-selector :--url [itemprop='url'];
@custom-selector :--abstracts [itemprop='abstracts'];
@custom-selector :--authorDetails [itemprop='authorDetails'];

/* Citation Styles */
@custom-selector :--citation-style-eLife [data-citation-style='eLife'];
@custom-selector :--citation-style-MLA [data-citation-style='MLA'];
@custom-selector :--citation-style-APA [data-citation-style='APA'];

:root {
--max-width: 680px;
--max-width-media: 980px;
Expand Down
Loading

0 comments on commit 3ac0897

Please sign in to comment.