From 99523f8925828a97d7f1f112b99e7e5080955d84 Mon Sep 17 00:00:00 2001 From: igoradamenko Date: Sun, 28 Jan 2018 23:10:14 +0200 Subject: [PATCH] move styles from root block to its elements --- web/app/components/root/__input/root__input.scss | 3 +++ web/app/components/root/__thread/root__thread.scss | 7 +++++++ web/app/components/root/index.js | 3 ++- web/app/components/root/root.jsx | 13 +++++++++---- web/app/components/root/root.scss | 5 ----- 5 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 web/app/components/root/__input/root__input.scss create mode 100644 web/app/components/root/__thread/root__thread.scss delete mode 100644 web/app/components/root/root.scss diff --git a/web/app/components/root/__input/root__input.scss b/web/app/components/root/__input/root__input.scss new file mode 100644 index 00000000..2440c942 --- /dev/null +++ b/web/app/components/root/__input/root__input.scss @@ -0,0 +1,3 @@ +.root__input { + margin-bottom: 24px; +} diff --git a/web/app/components/root/__thread/root__thread.scss b/web/app/components/root/__thread/root__thread.scss new file mode 100644 index 00000000..b4bb00e2 --- /dev/null +++ b/web/app/components/root/__thread/root__thread.scss @@ -0,0 +1,7 @@ +@import 'common/variables'; + +.root__thread { + &:last-child { + margin-bottom: -$offset; + } +} diff --git a/web/app/components/root/index.js b/web/app/components/root/index.js index 15a696f0..a830ac1c 100644 --- a/web/app/components/root/index.js +++ b/web/app/components/root/index.js @@ -1,3 +1,4 @@ export { default } from './root'; -require('./root.scss'); +require('./__input/root__input.scss'); +require('./__thread/root__thread.scss'); diff --git a/web/app/components/root/root.jsx b/web/app/components/root/root.jsx index fa4e79e7..80b7ef44 100644 --- a/web/app/components/root/root.jsx +++ b/web/app/components/root/root.jsx @@ -3,6 +3,7 @@ import api from 'common/api'; import { url, id } from 'common/settings'; +import Input from 'components/input'; import Thread from 'components/thread'; export default class Root extends Component { @@ -13,10 +14,14 @@ export default class Root extends Component { render({}, { comments = [] }) { return ( -
- { - comments.map(thread => ) - } +
+
+ + + { + comments.map(thread => ) + } +
); } diff --git a/web/app/components/root/root.scss b/web/app/components/root/root.scss deleted file mode 100644 index db297aeb..00000000 --- a/web/app/components/root/root.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import 'common/variables'; - -.root { - margin-bottom: -$offset; -}