aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiayi Zheng <thebluber@gmail.com>2016-11-13 17:52:20 +0100
committerJiayi Zheng <thebluber@gmail.com>2016-11-13 17:52:20 +0100
commit53fed694dfa4f2c4fe5c8f58ad8eb728c7720449 (patch)
tree18a92533abe8d0647dadfef5411c8e9c4f295814
parent11125abeeba1e945461ac5d1708e89cac7bf0714 (diff)
Refactor css
Apply different styles to reply, retweet and favorite buttons
-rw-r--r--src/App.scss8
-rw-r--r--src/_variables.scss6
-rw-r--r--src/components/favorite_button/favorite_button.vue15
-rw-r--r--src/components/retweet_button/retweet_button.vue18
-rw-r--r--src/components/status/status.vue13
5 files changed, 40 insertions, 20 deletions
diff --git a/src/App.scss b/src/App.scss
index c155de73..a97ad56d 100644
--- a/src/App.scss
+++ b/src/App.scss
@@ -1,7 +1,4 @@
-$main-color: #f58d2c;
-$main-background: white;
-$darkened-background: whitesmoke;
-
+@import './_variables.scss';
#app {
background-color: $main-color;
background-size: cover;
@@ -225,9 +222,10 @@ status.ng-enter.ng-enter-active {
}
.fa {
- color: $main-color;
+ color: grey;
}
+
.status-actions {
width: 50%;
display: flex;
diff --git a/src/_variables.scss b/src/_variables.scss
new file mode 100644
index 00000000..c317fd32
--- /dev/null
+++ b/src/_variables.scss
@@ -0,0 +1,6 @@
+$main-color: #f58d2c;
+$main-background: white;
+$darkened-background: whitesmoke;
+$green: #0fa00f;
+$blue: #0095ff;
+
diff --git a/src/components/favorite_button/favorite_button.vue b/src/components/favorite_button/favorite_button.vue
index 0455c706..6eaf0607 100644
--- a/src/components/favorite_button/favorite_button.vue
+++ b/src/components/favorite_button/favorite_button.vue
@@ -7,8 +7,15 @@
<script src="./favorite_button.js" ></script>
-<style>
- .favorite-button {
- cursor: pointer
- }
+<style lang='scss'>
+ @import '../../_variables.scss';
+ .favorite-button {
+ cursor: pointer;
+ &:hover {
+ color: $main-color;
+ }
+ }
+ .icon-star {
+ color: $main-color;
+ }
</style>
diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue
index ec94356a..9b2f5c7b 100644
--- a/src/components/retweet_button/retweet_button.vue
+++ b/src/components/retweet_button/retweet_button.vue
@@ -7,12 +7,16 @@
<script src="./retweet_button.js" ></script>
-<style>
- .icon-retweet {
- cursor: pointer
- }
- .retweeted {
+<style lang='scss'>
+ @import '../../_variables.scss';
+ .icon-retweet {
+ cursor: pointer;
+ &:hover {
+ color: $green;
+ }
+ }
+ .retweeted {
cursor: auto;
- color: green;
- }
+ color: $green;
+ }
</style>
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index d309c495..d4bcc279 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -51,7 +51,8 @@
<script src="./status.js" ></script>
<style lang="scss">
- .status-el {
+ @import '../../_variables.scss';
+ .status-el {
hyphens: auto;
overflow-wrap: break-word;
word-wrap: break-word;
@@ -66,9 +67,13 @@
margin-top: 3px;
margin-bottom: 3px;
}
- }
+ }
- .status-actions {
+ .status-actions {
padding-top: 5px;
- }
+ }
+
+ .icon-reply:hover {
+ color: $blue;
+ }
</style>