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

Commit

Permalink
refactor(Styles): Make only stencila theme extend Article
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Sep 10, 2019
1 parent 8b3897c commit da293af
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .postcssrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"postcss-import-url": { "modernBrowser": true },
"postcss-url": { "url": "rebase" },
"postcss-mixins": {
"mixinsDir": "src/common/styles/mixins"
"mixinsDir": "src/designa/mixins"
},
"postcss-custom-selectors": {
"importFrom": "src/common/styles/selectors.css"
},
"postcss-custom-properties": {
"preserve": false
"preserve": true
},
"postcss-nested": true,
"autoprefixer": true
Expand Down
3 changes: 0 additions & 3 deletions src/common/styles/Article.css

This file was deleted.

4 changes: 0 additions & 4 deletions src/common/styles/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
@import 'prismjs/plugins/line-highlight/prism-line-highlight.css';
@import 'prismjs/plugins/line-numbers/prism-line-numbers.css';

@import './Entity.css';
@import './Person.css';
@import './Article.css';

@import './citations.css';

article {
Expand Down
15 changes: 15 additions & 0 deletions src/designa/Article.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@import './Entity.css';
@import './Person.css';

:--Article {
@mixin CreativeWork;

max-width: var(--article-content-max-width);
margin-left: auto;
margin-right: auto;

font-family: var(--article-content-font-family);
font-size: var(--article-content-font-size);
line-height: var(--article-content-line-height);
color: var(--article-content-color);
}
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src/themes/stencila/index.ts
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
import '../../common/js/index'
4 changes: 3 additions & 1 deletion src/themes/stencila/styles.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import '../../common/styles/common.css';
@import 'prismjs/themes/prism.css';
@import '../../common/fonts/merriweather/merriweather.css';

Expand All @@ -8,6 +7,8 @@
--body-font: Merriweather, serif;
}

@import '../../designa/Article.css';

body {
font-family: var(--body-font);
font-size: 16px;
Expand Down Expand Up @@ -42,6 +43,7 @@ article {
}
}

div,
p,
h1,
h2,
Expand Down

0 comments on commit da293af

Please sign in to comment.