From e61d07dc2333c7b35428d81de721b2d700d23c93 Mon Sep 17 00:00:00 2001 From: echenley Date: Wed, 16 Sep 2015 20:31:29 -0500 Subject: [PATCH] style tweaks --- src/js/actions/Actions.js | 1 + src/scss/_general.scss | 7 +++-- src/scss/_helpers.scss | 11 ------- src/scss/_modal.scss | 14 +++++++-- src/scss/_navbar.scss | 63 ++++++++++++++++++++++++++++++--------- src/scss/_posts.scss | 22 +++++++++++--- 6 files changed, 85 insertions(+), 33 deletions(-) diff --git a/src/js/actions/Actions.js b/src/js/actions/Actions.js index 18c92e3..ecd1fc0 100644 --- a/src/js/actions/Actions.js +++ b/src/js/actions/Actions.js @@ -154,6 +154,7 @@ Actions.downvotePost.listen((userId, postId) => { }); }); + /* Comment Actions =============================== */ diff --git a/src/scss/_general.scss b/src/scss/_general.scss index 0b046c1..72bcf74 100644 --- a/src/scss/_general.scss +++ b/src/scss/_general.scss @@ -3,7 +3,7 @@ ====================================== */ h1 { margin-top: 0; } -h1,h2,h3,h4,h5,h6 { +h1, h2, h3, h4, h5, h6 { font-family: $heading-font; } @@ -11,7 +11,10 @@ a { color: $link; cursor: pointer; text-decoration: none; - &:hover { text-decoration: underline; } + + &:hover { + text-decoration: underline; + } } hr { diff --git a/src/scss/_helpers.scss b/src/scss/_helpers.scss index 469917f..8266189 100644 --- a/src/scss/_helpers.scss +++ b/src/scss/_helpers.scss @@ -108,17 +108,6 @@ } } -// .button-gray { -// background: $dark-gray; - -// &:active { -// border-bottom-width: 1px; -// } -// &:hover { -// background: darken($button, 3%); -// } -// } - .error { color: $error; } \ No newline at end of file diff --git a/src/scss/_modal.scss b/src/scss/_modal.scss index 64ec2e2..47a68e0 100644 --- a/src/scss/_modal.scss +++ b/src/scss/_modal.scss @@ -55,13 +55,23 @@ right: 5px; width: 40px; height: 40px; - line-height: 40px; text-align: center; - color: $dark-gray; border-radius: 50%; background: transparent; transition: background 150ms; + svg { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + display: inline-block; + vertical-align: middle; + width: 15px; + height: 15px; + fill: $dark-gray; + } + &:hover { background: rgba(#000, 0.05); } diff --git a/src/scss/_navbar.scss b/src/scss/_navbar.scss index 6de4c3c..d08cdf9 100644 --- a/src/scss/_navbar.scss +++ b/src/scss/_navbar.scss @@ -17,17 +17,20 @@ } .menu-title { - padding: $x-small $small; -} - -.newpost-link { display: inline-block; - vertical-align: middle; - margin-left: 0.5rem; - padding: 0 1rem; - line-height: 1; - font-size: 2em; - cursor: pointer; + vertical-align: top; + padding: 0 $small; + + span { + display: inline-block; + margin-top: -0.3rem; + vertical-align: middle; + line-height: 1; + } + + &:hover span { + text-decoration: underline; + } } .header-title { @@ -40,18 +43,50 @@ .profile-link { display: inline-block; + vertical-align: top; + + &:hover .username { + text-decoration: underline; + } +} + +.profile-pic, +.username { + display: inline-block; + margin-top: -0.3rem; + vertical-align: middle; + line-height: 1; } .profile-pic { width: $medium; height: $medium; - margin: 0 0.8rem; - vertical-align: middle; + margin-left: 0.8rem; border-radius: 50%; - // filter: grayscale(100%); + @media screen and (max-width: 600px) { display: none; } } -// .username {} \ No newline at end of file +.newpost-link { + position: relative; + display: inline-block; + height: $nav-height; + width: 64px; + vertical-align: top; + margin-left: 0.5rem; + padding: 0 1rem; + font-size: 2em; + cursor: pointer; + + svg { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 30px; + height: 30px; + fill: #fff; + } +} \ No newline at end of file diff --git a/src/scss/_posts.scss b/src/scss/_posts.scss index a8a6b92..fe146f5 100644 --- a/src/scss/_posts.scss +++ b/src/scss/_posts.scss @@ -42,19 +42,33 @@ // .comments-link {} .upvote { + display: inline-block; color: $dark-gray; user-select: none; + line-height: 1; &:hover { text-decoration: none; } - &.upvoted { - color: $upvoted; + &.updating { + opacity: 0.8; } - &.updating { - transform: scale(0.8); + > * { + display: inline-block; + vertical-align: middle; + } + + svg { + width: 12px; + height: 12px; + margin-left: 3px; + fill: $dark-gray; + } + + &.upvoted svg { + fill: $upvoted; } }