From 20adf55c11e0ac07d4fe78cb0f6bffe37f7c6623 Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Tue, 13 Feb 2018 17:12:02 -0500 Subject: [PATCH] Breaking up main stylesheet into per-component styles --- package.json | 1 + postcss.config.js | 1 + src/components/Footer/index.js | 2 + src/components/Footer/style.css | 11 ++ .../Header/__snapshots__/test.js.snap | 1 - src/components/Header/index.js | 3 +- src/components/Header/style.css | 63 ++++++++ .../Message/__snapshots__/test.js.snap | 20 +-- src/components/Message/index.js | 14 +- src/components/Message/style.css | 41 +++++ .../RavenError/__snapshots__/test.js.snap | 2 +- src/components/RavenError/index.js | 2 +- src/globals.css | 12 ++ src/pages/404/Component.js | 2 +- src/pages/index/Component.js | 2 +- src/style.css | 140 +----------------- yarn.lock | 23 ++- 17 files changed, 182 insertions(+), 158 deletions(-) create mode 100644 src/components/Footer/style.css create mode 100644 src/components/Header/style.css create mode 100644 src/components/Message/style.css create mode 100644 src/globals.css diff --git a/package.json b/package.json index 3f8914d..1d842f4 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "json-loader": "^0.5.7", "npm-run-all": "^4.1.2", "postcss-cssnext": "^3.1.0", + "postcss-import": "^11.1.0", "postcss-loader": "^2.1.0", "raven-js": "^3.22.2", "react": "^16.2.0", diff --git a/postcss.config.js b/postcss.config.js index c4a0414..5fc6079 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,5 +1,6 @@ module.exports = { plugins: [ + require('postcss-import'), require('postcss-cssnext') ] }; diff --git a/src/components/Footer/index.js b/src/components/Footer/index.js index 9b91a29..3992ca6 100644 --- a/src/components/Footer/index.js +++ b/src/components/Footer/index.js @@ -1,6 +1,8 @@ import React from 'react'; import { translate, Trans } from 'react-i18next'; +import './style.css'; + const Footer = () => (