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

Commit

Permalink
refactor(Styles): Use mixins to make styles more DRY
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Sep 9, 2019
1 parent 50c14a9 commit 8b3897c
Show file tree
Hide file tree
Showing 10 changed files with 392 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .postcssrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
"postcss-import": true,
"postcss-import-url": { "modernBrowser": true },
"postcss-url": { "url": "rebase" },
"postcss-nested": true,
"postcss-mixins": {
"mixinsDir": "src/common/styles/mixins"
},
"postcss-custom-selectors": {
"importFrom": "src/common/styles/selectors.css"
},
"postcss-custom-properties": {
"preserve": false
},
"postcss-nested": true,
"autoprefixer": true
}
}
267 changes: 267 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"postcss-custom-selectors": "^5.1.2",
"postcss-import": "^12.0.1",
"postcss-import-url": "^4.0.0",
"postcss-mixins": "^6.2.2",
"postcss-nested": "^4.1.2",
"postcss-url": "^8.0.0",
"prismjs": "^1.17.1",
Expand Down
3 changes: 3 additions & 0 deletions src/common/styles/Article.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:--Article {
@mixin CreativeWork;
}
8 changes: 8 additions & 0 deletions src/common/styles/Entity.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:--Entity {
/*
Do not display `Entity` elements. These are a fallback
encoding for `Node` types which have no explicit HTML encoding yet
and contain only a JSON representation of the node.
*/
display: none;
}
Loading

0 comments on commit 8b3897c

Please sign in to comment.