session-desktop/stylesheets/_global.scss

515 lines
8.3 KiB
SCSS
Raw Normal View History

* {
box-sizing: border-box;
}
html {
height: 100%;
}
body {
position: relative;
height: 100%;
width: 100%;
margin: 0;
font-family: $roboto;
font-size: 14px;
}
2015-02-06 07:42:16 +01:00
.clearfix:before,
.clearfix:after {
display: table;
content: " ";
}
.clearfix:after {
clear: both;
}
.hide {
display: none;
}
#header {
2016-03-21 19:03:50 +01:00
background-color: $blue;
color: white;
transition: background-color 0.5s;
2016-03-21 19:03:50 +01:00
&.inactive {
background-color: $grey_l;
color: $grey_d;
}
h1 {
margin: 0;
line-height: $header-height;
padding-left: 20px;
font-size: 22px;
font-weight: normal;
}
2015-01-30 22:20:32 +01:00
}
.conversation-header button,
.title-bar button {
width: $button-height;
height: $button-height;
line-height: $button-height;
padding: 0;
border: 0;
outline: 0;
}
button { cursor: pointer; }
a { color: $blue; }
.inactive button.back {
@include header-icon-black('/images/back.svg');
}
button.back {
@include header-icon-white('/images/back.svg');
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
}
::-webkit-scrollbar-thumb {
background: rgba(0,0,0,0.15);
2016-04-01 23:24:13 +02:00
border-radius: $border-radius;
}
.header-buttons {
&.left {
float: left;
padding-left: 10px;
}
&.right {
float: right;
padding-right: 10px;
}
height: 0;
.vertical-align {
height: $header-height;
vertical-align: middle;
display: table-cell;
}
}
2016-03-21 19:03:50 +01:00
.inactive .menu .hamburger {
@include header-icon-black('/images/menu.svg');
2016-03-21 19:03:50 +01:00
}
2015-01-30 22:20:32 +01:00
.menu {
position: relative;
float: right;
2015-01-30 22:20:32 +01:00
.hamburger {
width: $button-height;
height: $button-height;
vertical-align: middle;
@include header-icon-white('/images/menu.svg');
2015-01-30 22:20:32 +01:00
}
.menu-list {
display: none;
position: absolute;
2015-05-22 02:07:11 +02:00
color: $grey_d;
2016-03-18 21:09:45 +01:00
z-index: 50;
text-align: initial;
2015-05-22 02:07:11 +02:00
2015-01-30 22:20:32 +01:00
top: 100%;
right: 0;
2015-01-30 22:20:32 +01:00
margin: 0;
padding: 0;
background-color: white;
box-shadow: 0 0 1px 1px rgba(0,0,0, 0.2);
2015-01-30 22:20:32 +01:00
li {
display: block;
white-space: nowrap;
cursor: pointer;
padding: 5px 15px 5px 10px;
2015-03-13 01:39:56 +01:00
&:hover {
background-color: $grey_l;
2015-03-13 01:39:56 +01:00
}
2015-01-30 22:20:32 +01:00
}
}
}
2015-02-06 07:42:16 +01:00
.file-input {
position: relative;
.choose-file {
cursor: pointer;
2016-04-01 23:46:04 +02:00
padding-left: 10px;
}
2015-02-06 07:42:16 +01:00
.paperclip {
2016-04-01 23:46:04 +02:00
width: $button-height;
height: 100%;
2016-04-01 23:46:04 +02:00
@include color-svg('/images/paperclip.svg', $grey);
opacity: 0.5;
transform: rotateZ(-45deg);
&:hover {
opacity: 1.0;
}
2015-02-06 07:42:16 +01:00
}
input[type=file] {
display: none;
position: absolute;
width: 100%;
height: 100%;
opacity: 0;
top: 0;
left: 0;
cursor: pointer;
z-index: 1;
}
.close {
font-family: sans-serif;
color: white;
position: absolute;
top: 5px;
right: 2px;
cursor: pointer;
2015-02-06 07:42:16 +01:00
border-radius: 50%;
width: 20px;
height: 20px;
padding: 0px;
background: #666;
color: #fff;
text-align: center;
}
}
.dropoff {
2016-03-22 01:17:39 +01:00
outline: solid 1px #2090ea;
}
img.emoji {
height: 1em;
width: 1em;
margin: 0 .05em 0 .1em;
vertical-align: -0.1em;
}
$avatar-size: 44px;
.avatar {
display: inline-block;
height: $avatar-size;
width: $avatar-size;
border-radius: 50%;
background-size: cover;
vertical-align: middle;
text-align: center;
line-height: $avatar-size;
overflow-x: hidden;
text-overflow: ellipsis;
color: white;
2016-03-19 02:02:58 +01:00
font-size: 18px;
}
.group-info-input {
background: white;
.group-avatar {
display: inline-block;
padding: 2px 0px 0px 2px;
}
.file-input .thumbnail, .thumbnail .avatar,
img {
height: 54px;
width: 54px;
border-radius: (54px / 2);
}
.thumbnail:after {
content: '';
position: absolute;
height: 0;
width: 0;
bottom: 0;
right: 0;
border-bottom: 10px solid $grey;
border-left: 10px solid transparent;
}
input.name {
padding: 0.5em;
border: solid 1px #ccc;
border-width: 0 0 1px 0;
width: calc(100% - 84px);
}
2015-08-04 21:15:37 +02:00
}
2015-08-04 21:15:37 +02:00
.group-member-list,
.new-group-update {
.members .contact {
box-shadow: none;
border-bottom: 1px solid #eee;
.last-message, .last-timestamp {
display: none;
}
.number {
display: none;
}
}
}
.conversation-list-item {
cursor: pointer;
&:hover {
background: #f8f8f8;
}
.number {
display: none;
}
.unread-count {
float: right;
margin: 3px 10px 0 20px;
display: inline-block;
padding: 0 3px;
min-width: $unread-badge-size;
height: $unread-badge-size;
line-height: $unread-badge-size;
font-size: 12px;
font-weight: bold;
text-align: center;
2016-04-01 23:24:13 +02:00
border-radius: $border-radius;
background-color: $blue;
color: white;
border: solid 1px rgba(255,255,255,0.6);
}
}
.inactive .contact.selected {
padding-left: 8px;
border-left: 4px solid $blue;
}
.contact {
position: relative;
padding: 12px;
white-space: nowrap;
overflow: hidden;
background: rgba(255,255,255,0.6);
margin: 1px;
2015-08-28 02:01:34 +02:00
&.selected {
background: rgb(236, 243, 252);
2015-08-28 02:01:34 +02:00
}
&:first-child {
margin-top: 0;
}
&:last-child::after {
display: none;
}
.contact-details {
$left-margin: 8px;
vertical-align: middle;
display: inline-block;
margin: 0 0 0 $left-margin;
width: calc(100% - #{$avatar-size} - #{$left-margin});
p {
overflow-x: hidden;
text-overflow: ellipsis;
}
}
.name {
display: block;
margin: 0;
font-size: 1em;
font-weight: 400;
text-overflow: ellipsis;
overflow-x: hidden;
}
.number {
color: $grey;
font-size: small;
}
}
.recipients-input {
position: relative;
.recipients-container {
background-color: white;
padding: 2px;
border-bottom: 1px solid #f2f2f2;
line-height: 24px;
}
.recipient {
display: inline-block;
margin: 0 2px 2px 0;
padding: 0 5px;
border-radius: 10px;
background-color: $blue;
color: white;
&.error {
background-color: #f00;
}
.remove {
margin-left: 5px;
padding: 0 2px;
}
}
.results {
position: absolute;
z-index: 10;
margin: 0 0 0 20px;
width: calc(100% - 30px);
max-width: 300px;
max-height: 55px * 3;
overflow-y: auto;
box-shadow: 0px 0px 1px rgba(#aaa, 0.8);
.contact {
cursor: pointer;
}
}
}
.attachment-preview {
display: inline-block;
position: relative;
img {
max-width: 100%;
}
}
2015-09-01 00:11:00 +02:00
.new-conversation .recipients-input .recipients::before {
content: 'To: ';
}
.new-group-update .recipients-input .recipients::before {
2015-09-01 00:11:00 +02:00
content: 'Add: ';
}
.loading {
position: relative;
&::before {
display: block;
margin: 0px auto;
content: " ";
height: $loading-height;
width: $loading-height;
border-radius: 2 * $loading-height;
border: solid 3px;
border-color: $blue_l $blue_l $grey_l $grey_l !important;
animation: rotate 1s linear infinite;
}
@keyframes rotate {
to { transform: rotate(360deg); }
}
}
.debug-log {
&.modal {
padding: 50px;
.content {
margin: 0;
max-width: 100%;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
textarea {
flex-grow: 1;
width: 100%;
resize: none;
}
}
}
button, input[type=submit] {
2016-04-01 23:24:13 +02:00
border-radius: $border-radius;
border: solid 1px #ccc;
cursor: pointer;
margin: 1em auto;
padding: 1em;
font-family: inherit;
color: $grey;
background: $grey_l;
box-shadow: 0 0 10px -5px rgba($grey, 0.5);
&:hover {
color: black;
box-shadow: 0 0 10px -3px rgba($grey, 0.7);
}
}
.result {
text-align: center;
a {
-webkit-user-select: text;
}
}
}
.modal {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, 0.3);
padding: 0 20px;
2016-03-18 21:09:45 +01:00
z-index: 100;
.content {
position: relative;
max-width: 350px;
margin: 100px auto;
padding: 1em;
background: white;
2016-04-01 23:24:13 +02:00
border-radius: $border-radius;
overflow: auto;
box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.2);
}
a.x {
display: inline-block;
float: right;
cursor: pointer;
font-family: sans-serif;
color: white;
border-radius: 50%;
width: 20px;
height: 20px;
padding: 0px;
background: #666;
color: #fff;
text-align: center;
font-size: 19px;
}
}
input[type=text], input[type=search], textarea {
&:active, &:focus {
outline: 1px solid $blue;
}
}