xmpp.chapril.org-conversejs/sass/_chatbox.scss
2016-10-05 23:15:42 +02:00

384 lines
12 KiB
SCSS

#conversejs {
.flyout {
border-radius: $chatbox-border-radius;
@media screen and (max-height: $mobile-landscape-height) {
border-radius: 0;
}
@media screen and (max-width: $mobile-portrait-length) {
border-radius: 0;
}
bottom: $chatbox-hover-height;
display: block;
position: absolute;
@media screen and (max-height: $mobile-landscape-height) {
bottom: 0;
}
@media screen and (max-width: $mobile-portrait-length) {
bottom: 0;
}
}
.chat-head {
border-top-left-radius: $chatbox-border-radius;
border-top-right-radius: $chatbox-border-radius;
@media screen and (max-height: $mobile-landscape-height) {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
@media screen and (max-width: $mobile-portrait-length) {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
color: #ffffff;
font-size: 100%;
height: $chat-head-height;
margin: 0;
padding: 5px;
position: relative;
.avatar {
margin-right: 0.5em;
border-radius: 50%;
float: left;
}
&.chat-head-chatbox {
background-color: $chat-head-color;
}
.user-custom-message {
clear: left;
color: white;
font-size: 80%;
font-style: italic;
height: 1.3em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin: 0;
padding-top: 0.2em;
}
}
.chatbox-btn {
border-radius: 50%;
border: 1px solid white;
color: white;
cursor: pointer;
display: inline-block;
float: right;
font-size: $box-close-font-size;
margin: 0;
margin-left: 0.1em;
margin-right: 0.2em;
padding: 0.5em 0.5em 0.3em 0.5em;
text-decoration: none;
&:active {
position: relative;
top: 1px;
}
&.button-on {
background-color: white;
color: $chat-head-color;
}
}
.chatbox {
display: block;
float: right;
height: $bottom-gutter-height;
margin: 0 $chat-gutter;
width: $chat-width;
@media screen and (max-height: $mobile-landscape-height) {
margin: 0;
width: $mobile-chat-width;
}
@media screen and (max-width: $mobile-portrait-length) {
margin: 0;
width: $mobile-chat-width;
}
.box-flyout {
background-color: white;
box-shadow: 1px 3px 5px 3px rgba(0, 0, 0, 0.4);
height: $chat-height;
min-height: $chat-height/2;
min-width: $chat-width;
width: $chat-width;
z-index: 1;
@media screen and (max-height: $mobile-landscape-height) {
height: $mobile-chat-height;
width: $mobile-chat-width;
height: 100vh;
}
@media screen and (max-width: $mobile-portrait-length) {
height: $mobile-chat-height;
width: $mobile-chat-width;
height: 100vh;
}
}
.chat-title {
color: $chat-head-text-color;
line-height: 15px;
display: block;
text-overflow: ellipsis;
overflow: hidden;
height: 2em;
a {
color: $chat-head-text-color;
width: 100%;
}
}
.chat-body {
background-color: white;
border-bottom-left-radius: $chatbox-border-radius;
border-bottom-right-radius: $chatbox-border-radius;
@media screen and (max-height: $mobile-landscape-height) {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
@media screen and (max-width: $mobile-portrait-length) {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
border-top: 0;
height: 289px;
@include calc(height, '100% - #{$chat-head-height}');
p {
color: $text-color;
font-size: $font-size;
margin: 0;
padding: 5px;
}
.chat-info {
color: $warning-color;
margin: 0.3em;
&.chat-event {
clear: left;
font-style: italic;
}
&.chat-error {
color: $warning-color;
font-weight: bold;
}
&.chat-date {
display: inline-block;
margin-top: 1em;
}
}
.chat-image {
max-width: 100%;
max-height: 100%;
}
.chat-message {
margin: 0.3em;
span {
display: inline-block;
&.chat-msg-author {
max-width: 100%;
font-weight: bold;
white-space: nowrap;
float: left;
text-overflow: ellipsis;
overflow: hidden;
}
&.chat-msg-them {
color: $message-them-color;
}
&.chat-msg-me {
color: $link-color;
}
&.chat-msg-content {
max-width: 100%;
word-wrap: break-word;
}
}
}
.delayed {
.chat-msg-them {
color: #FB5D50;
}
.chat-msg-me {
color: #7EABBB;
}
}
}
.new-msgs-indicator {
position: absolute;
width: 100%;
cursor: pointer;
background-color: $chat-head-color;
color: $light-background-color;
padding: 0.3em;
font-size: 0.9em;
text-align: center;
z-index: 20;
}
.chat-content {
position: relative;
padding: 0.5em;
font-size: 13px;
color: $text-color;
overflow-y: auto;
border: 0;
background-color: #ffffff;
line-height: 1.3em;
height: 206px;
height: calc(100% - #{$toolbar-height + $chat-textarea-height +1px});
}
.dropdown { /* status dropdown styles */
background-color: $light-background-color;
dd {
margin: 0;
padding: 0;
position: relative;
}
}
form.sendXMPPMessage {
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
@include border-bottom-radius($chatbox-border-radius);
background-clip: padding-box;
background: white;
border-top: 1px solid #BBB;
border: 0;
margin: 0;
padding: 0;
position: relative;
height: #{$chat-textarea-height + $toolbar-height};
min-width: $chat-width;
@media screen and (max-height: $mobile-landscape-height) {
width: 100%;
}
@media screen and (max-width: $mobile-portrait-length) {
width: 100%;
}
.chat-textarea {
@include border-bottom-radius($chatbox-border-radius);
border: 0;
height: $chat-textarea-height;
padding: 0.5em;
width: 100%;
resize: none;
}
.chat-toolbar {
font-size: $font-size;
margin: 0;
padding: 5px;
height: $toolbar-height;
display: block;
background-color: $toolbar-color;
a {
color: $link-color;
}
.chat-toolbar-text {
font-size: 12px;
padding-right: 3px;
text-shadow: 0 1px 0 white
}
.unencrypted a,
.unencrypted {
color: $warning-color;
}
.unverified a,
.unverified {
color: #cf5300;
}
.private a,
.private {
color: #4b7003;
}
.toggle-occupants,
.toggle-clear,
.toggle-otr {
float: right;
}
li {
display: inline-block;
list-style: none;
padding: 0 3px 0 3px;
cursor: pointer;
margin-top: 1px;
}
li:hover {
cursor: pointer;
}
ul {
background: #fff;
bottom: 100%;
box-shadow: -1px -1px 2px 0 rgba(0, 0, 0, 0.4);
display: none;
font-size: 12px;
margin: 0;
position: absolute;
right: 0;
li {
cursor: pointer;
list-style: none;
position: relative;
a:hover {
color: #8f2831;
}
}
}
.toggle-smiley {
color: $link-color;
padding-left: 5px;
ul {
li {
font-size: $font-size;
padding: 5px;
z-index: 98;
}
li:hover {
background-color: $highlight-color;
}
}
}
.toggle-otr {
ul {
li {
padding: 7px;
background-color: white;
display: block;
z-index: 99;
a {
-moz-transition: background-color 0.2s ease-in-out;
-webkit-transition: background-color 0.2s ease-in-out;
transition: background-color 0.2s ease-in-out;
display: block;
padding: 1px;
text-decoration: none;
}
}
li:hover {
background-color: $highlight-color;
}
}
}
}
}
.dragresize {
background: transparent;
border: 0;
margin: 0;
position: absolute;
top: 0;
z-index: 20;
&-top {
cursor: n-resize;
height: 5px;
width: 100%;
}
&-left {
cursor: w-resize;
width: 5px;
height: 100%;
left: 0;
}
&-topleft {
cursor: nw-resize;
width: 15px;
height: 15px;
top: 0;
left: 0;
}
}
}
}