Browse Source

Convert colors to variables.

pull/29/head^2
Evan Theurer 12 years ago
parent
commit
d0e8c06a2a
  1. 33
      src/styles/components/_chat.scss
  2. 7
      src/styles/global/_variables.scss

33
src/styles/components/_chat.scss

@ -382,37 +382,38 @@
width: 0; width: 0;
} }
&.is_remote { &.is_remote {
&:before { background: $chat-msg-remote-background;
&:before { // arrow border
border-width: 10px 17px 10px 0; border-width: 10px 17px 10px 0;
border-color: transparent #fff; border-color: transparent $chat-msg-remote-background;
bottom: auto; bottom: auto;
left: -16px; left: -16px;
top: 4px; top: 4px;
} }
&:after { &:after { // arrow background
border-width: 9px 15px 9px 0; border-width: 9px 15px 9px 0;
border-color: transparent #fff; border-color: transparent $chat-msg-remote-background;
bottom:auto; bottom:auto;
left: -15px; left: -15px;
top: 5px; top: 5px;
} }
} }
&.is_self { &.is_self {
background: #fff; background: $chat-msg-self-background;
margin-right:20px; margin-right:20px;
margin-left: 4px; margin-left: 4px;
padding-right: 0; padding-right: 0;
&:before { &:before { // arrow border
border-width: 10px 0 10px 17px; border-width: 10px 0 10px 17px;
border-color: transparent #fff; border-color: transparent $chat-msg-self-background;
bottom:auto; bottom: auto;
right: -16px; right: -16px;
top: 4px; top: 4px;
} }
&:after { &:after { // arrow background
border-width: 9px 0 9px 15px; border-width: 9px 0 9px 15px;
border-color: transparent #fff; border-color: transparent $chat-msg-self-background;
bottom:auto; bottom: auto;
right: -15px; right: -15px;
top: 5px; top: 5px;
} }
@ -424,7 +425,7 @@
.chat { .chat {
.chatbodybottom { .chatbodybottom {
background: #e7e7e7; background: $chat-bottom-background;
bottom: 1px; bottom: 1px;
left: 0; left: 0;
margin: 0 auto; margin: 0 auto;
@ -439,7 +440,7 @@
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
font-size:.8em; font-size:.8em;
color: #aaa; color: $chat-typing;
height: 14px; height: 14px;
@include breakpt-height($breakpoint-chat-small) { @include breakpt-height($breakpoint-chat-small) {
display: none; display: none;
@ -473,7 +474,7 @@
width: 100%; width: 100%;
&:active, &:active,
&:focus { &:focus {
border-color: #66afe9; border-color: $chat-input-border-color;
} }
@include breakpt-height($breakpoint-chat-small) { @include breakpt-height($breakpoint-chat-small) {
max-height: 2.5em; max-height: 2.5em;
@ -482,9 +483,9 @@
} }
@keyframes newmessage { @keyframes newmessage {
0% {background-color: rgba(132,184,25,1.0);} 0% {background-color: $actioncolor1;}
50% {background-color: $componentbg;} 50% {background-color: $componentbg;}
100% {background-color: rgba(132,184,25,1.0);} 100% {background-color: $actioncolor1;}
} }
.chat.newmessage { .chat.newmessage {

7
src/styles/global/_variables.scss

@ -73,6 +73,13 @@ $chat-msg-delivered-icon: '\f019';
$chat-msg-received-icon: '\f06e'; $chat-msg-received-icon: '\f06e';
$chat-msg-read-icon: '\f00c'; $chat-msg-read-icon: '\f00c';
$chat-msg-self-background: white;
$chat-msg-remote-background: white;
$chat-bottom-background: $chat-background;
$chat-typing: $chat-meta;
$chat-input-border-color: #66afe9;
$tap-highlight: rgba(0, 0, 0, 0); $tap-highlight: rgba(0, 0, 0, 0);
$breakpoint-small: 480px; $breakpoint-small: 480px;

Loading…
Cancel
Save