Scylla/static/scss/style.scss

350 lines
6.1 KiB
SCSS

@import url('https://fonts.googleapis.com/css?family=Open+Sans|Source+Code+Pro');
$primary-color: #53C0FA;
$primary-color-highlight: #4298C7;
$primary-color-light: #9FDBFB;
$background-color: #1b1e21;
$background-color-light: lighten($background-color, 4%);
$background-color-dark: darken($background-color, 4%);
$error-color: #f01d43;
$error-color-dark: darken(#f01d43, 10%);
$inactive-input-color: lighten($background-color-light, 5%);
$active-input-color: lighten($inactive-input-color, 5%);
$transition-duration: .250s;
$inset-shadow: inset 0px 0px 5px rgba(0, 0, 0, .25);
$border-radius: 3px;
html, body {
height: 100vh;
}
body {
font-family: 'Open Sans', sans-serif;
margin: 0px;
background-color: $background-color;
font-size: 12px;
color: white;
}
@mixin input-common {
padding: 5px;
border-radius: $border-radius;
outline: none;
font-family: inherit;
font-size: inherit;
&:focus {
transition: background-color $transition-duration;
}
}
input, textarea {
@include input-common();
overflow-x: hidden;
background-color: $inactive-input-color;
color: white;
border: none;
padding: 10px;
&:focus {
background-color: $active-input-color;
}
}
button {
@include input-common();
border: none;
background-color: $primary-color;
color: white;
text-transform: uppercase;
&:hover, &:focus {
background-color: $primary-color-highlight;
}
}
a {
text-decoration: none;
color: $primary-color;
&:hover {
color: $primary-color-highlight;
}
}
h2, h3 {
margin: 0px;
margin-bottom: 3px;
}
a.file-wrapper {
padding: 5px 0px 5px 0px;
display: flex;
align-items: center;
.feather-icon {
height: 30px;
width: 30px;
margin-right: 10px;
}
}
div.errors-wrapper {
position: fixed;
pointer-events: none;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
overflow: hidden;
}
div.error-wrapper {
pointer-events: auto;
width: 400px;
padding: 5px;
background-color: $error-color;
border: 1px solid $error-color-dark;
color: white;
margin: auto;
margin-top: 10px;
margin-bottom: 10px;
font-size: 14px;
display: flex;
align-items: center;
.feather-icon {
margin-right: 10px;
}
}
/*
* Login Screen
*/
div.login-wrapper {
display: flex;
flex-direction: column;
max-width: 300px;
margin: auto;
margin-top: 20px;
input, button {
margin: 3px;
}
}
/*
* Base View
*/
div.base-wrapper {
display: flex;
height: 100%;
> div {
padding: 10px;
box-sizing: border-box;
}
}
/*
* The list of rooms
*/
div.rooms-wrapper {
flex-shrink: 0;
background-color: $background-color-light;
.room-search {
padding: 5px;
width: 100%;
box-sizing: border-box;
}
}
div.room-link-wrapper {
whitespace: nowrap;
display: flex;
padding: 0px;
border-left: solid 2px $background-color-light;
padding-left: 5px;
margin: 3px;
align-items: center;
span, a {
margin-right: 5px;
color: lightgrey;
}
&:hover a {
color: $primary-color;
transition: color $transition-duration;
}
&.active {
border-left: solid 2px $primary-color;
}
&.hidden {
display: none;
}
}
div.reconnect-wrapper {
position: fixed;
bottom: 20px;
left: 20px;
display: flex;
align-items: center;
background-color: $inactive-input-color;
border-radius: $border-radius;
.feather-icon {
margin-right: 10px;
}
}
/*
* The current room, if any.
*/
div.room-wrapper {
flex-grow: 1;
display: flex;
height: 100%;
flex-direction: column;
padding: 5px;
}
div.typing-wrapper {
padding: 5px;
height: 1em;
flex-shrink: 0;
}
/*
* The message input and send button.
*/
div.message-wrapper {
display: flex;
flex-shrink: 0;
input, textarea {
flex-grow: 12;
margin: 3px;
}
button {
margin: 3px;
height: 40px;
width: 40px;
transition: background-color $transition-duration;
}
}
div.messages-wrapper {
overflow-y: scroll;
flex-grow: 1;
a.history-link {
display: block;
width: 100%;
text-align: center;
box-sizing: border-box;
padding: 5px;
}
}
table.messages-table {
border-collapse: collapse;
width: 100%;
table-layout: fixed;
td {
padding: 5px;
vertical-align: top;
}
img {
max-width: 90%;
max-height: 400px;
margin-top: 10px;
margin-bottom: 10px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, .5);
}
.sending {
color: grey;
}
video {
max-width: 90%;
max-height: 400px;
}
td:nth-child(1) {
width: 10%;
@media screen and (min-width: 1000px) {
width: 100px;
}
white-space: nowrap;
}
}
div.message {
p {
margin: 0px;
}
blockquote {
margin: 0px 0px 0px 0px;
padding-left: 5px;
border-left: 4px solid $primary-color;
}
code {
font-family: Iosevka, "Source Code Pro", monospace,
}
pre code {
width: 100%;
overflow: auto;
display: block;
box-sizing: border-box;
padding: 10px;
background-color: $background-color-dark;
border-radius: $border-radius;
box-shadow: $inset-shadow;
}
}
span.sender-wrapper {
border-radius: $border-radius;
padding-left: 5px;
padding-right: 5px;
display: inline-block;
box-sizing: border-box;
text-align: right;
font-weight: 800;
width: 100%;
text-overflow: ellipsis;
overflow: hidden;
vertical-align: bottom; /* Fix for overflow changing element height */
color: black;
}
/**
* Icons
*/
.feather-icon {
vertical-align: middle;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
fill: none;
height: 20px;
width: 20px;
}