lbry-desktop/src/renderer/scss/_gui.scss

400 lines
7.5 KiB
SCSS
Raw Normal View History

2018-03-26 23:32:43 +02:00
// Generic html styles used accross the App
// component specific styling should go in the component scss file
@font-face {
font-family: 'metropolis-bold';
src: url('../../../static/font/metropolis/bold.eot');
src: url('../../../static/font/metropolis/bold.eot?#iefix') format('embedded-opentype'),
url('../../../static/font/metropolis/bold.woff') format('woff'),
url('../../../static/font/metropolis/bold.ttf') format('truetype'),
url('../../../static/font/metropolis/bold.svg#metropolis-bold') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'metropolis-semibold';
src: url('../../../static/font/metropolis/semibold.eot');
src: url('../../../static/font/metropolis/semibold.eot?#iefix') format('embedded-opentype'),
url('../../../static/font/metropolis/semibold.woff') format('woff'),
url('../../../static/font/metropolis/semibold.ttf') format('truetype'),
url('../../../static/font/metropolis/semibold.svg#metropolis-semibold') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'metropolis-medium';
src: url('../../../static/font/metropolis/medium.eot');
src: url('../../../static/font/metropolis/medium.eot?#iefix') format('embedded-opentype'),
url('../../../static/font/metropolis/medium.woff') format('woff'),
url('../../../static/font/metropolis/medium.ttf') format('truetype'),
url('../../../static/font/metropolis/medium.svg#metropolis-medium') format('svg');
font-weight: normal;
font-style: normal;
}
2018-01-04 06:05:20 +01:00
html {
2017-05-02 00:31:13 +02:00
height: 100%;
}
body {
2018-03-26 23:32:43 +02:00
font-family: 'metropolis-semibold';
font-weight: 400;
font-size: 16px;
line-height: 1.5;
2017-08-20 07:58:03 +02:00
color: var(--text-color);
2018-03-26 23:32:43 +02:00
height: 100%;
overflow: hidden;
2017-05-02 00:31:13 +02:00
}
2017-01-21 22:31:41 +01:00
2018-03-26 23:32:43 +02:00
* {
box-sizing: border-box;
}
2018-03-26 23:32:43 +02:00
code {
font: 1.5em Consolas, 'Lucida Console', 'Source Sans', monospace;
background-color: var(--color-bg-alt);
}
2018-03-26 23:32:43 +02:00
// Without this buttons don't have the Metropolis font
button {
font-weight: inherit;
font-family: inherit;
}
2018-03-26 23:32:43 +02:00
ul {
list-style-type: none;
padding: 0;
2017-12-01 04:51:55 +01:00
}
2018-03-26 23:32:43 +02:00
input {
border-bottom: var(--input-border-size) dotted var(--input-border-color);
color: var(--input-color);
line-height: 1;
cursor: text;
background-color: transparent;
font-family: 'metropolis-medium';
&[type='radio'],
&[type='checkbox'],
&[type='file'],
&[type='select'] {
cursor: pointer;
}
2018-03-26 23:32:43 +02:00
&[type='file'] {
border-bottom: none;
}
2018-03-26 23:32:43 +02:00
&.input-copyable {
flex: 1;
background: var(--input-copyable-bg);
color: var(--input-copyable-color);
padding: 10px 16px;
border: 1px dashed var(--input-copyable-border);
}
2018-04-17 04:21:19 +02:00
&:not(.input-copyable):not(.wunderbar__input):not(:placeholder-shown):not(:disabled) {
&:hover {
border-color: var(--input-hover-border-color);
}
2018-03-26 23:32:43 +02:00
border-bottom: var(--input-border-size) solid var(--input-border-color);
}
&:disabled {
color: var(--input-disabled-color);
border-bottom: var(--input-border-size) solid var(--input-disabled-color);
cursor: default;
}
}
2018-04-06 07:15:29 +02:00
textarea {
font-family: 'metropolis-medium';
border: 1px solid var(--color-divider);
font-size: 0.8em;
width: 100%;
padding: $spacing-vertical * 1/3;
}
2018-03-26 23:32:43 +02:00
input::placeholder {
2018-04-17 04:21:19 +02:00
color: var(--input-placeholder-color);
2018-03-26 23:32:43 +02:00
opacity: 0.5;
}
2018-06-14 22:10:50 +02:00
label[for] {
2018-06-13 07:20:53 +02:00
cursor: pointer;
}
2018-03-26 23:32:43 +02:00
button + input {
margin-left: $spacing-vertical * 2/3;
}
2018-03-26 23:32:43 +02:00
dl {
width: 100%;
overflow: hidden;
padding: 0;
margin: 0;
overflow-x: scroll;
}
2018-03-26 23:32:43 +02:00
dt {
float: left;
width: 20%;
padding: 0;
margin: 0;
}
2018-03-26 23:32:43 +02:00
dd {
float: left;
width: 80%;
padding: 0;
margin: 0;
}
2018-03-26 23:32:43 +02:00
p {
font-family: 'metropolis-medium';
2018-09-26 19:48:07 +02:00
&:not(:first-of-type) {
margin-top: $spacing-vertical * 1/3;
}
}
2018-03-26 23:32:43 +02:00
.page {
2018-08-03 03:46:39 +02:00
z-index: 0;
2018-06-25 08:07:45 +02:00
position: absolute;
top: var(--header-height);
left: 0;
right: 0;
bottom: 0;
display: flex;
2018-03-26 23:32:43 +02:00
background-color: var(--color-bg);
@media only screen and (min-width: $medium-breakpoint) {
grid-template-columns: var(--side-nav-width-m) auto;
}
@media only screen and (min-width: $large-breakpoint) {
grid-template-columns: var(--side-nav-width-l) auto;
}
}
2018-03-26 23:32:43 +02:00
/*
Page content
*/
.content {
2018-06-25 08:07:45 +02:00
flex: 1;
overflow: auto;
}
2018-03-26 23:32:43 +02:00
.main {
padding: $spacing-width $spacing-width;
margin: auto;
overflow: hidden;
}
2018-03-26 23:32:43 +02:00
.main--contained {
max-width: 1000px;
2018-06-20 06:55:48 +02:00
margin: auto;
2016-10-22 10:31:48 +02:00
}
2018-03-26 23:32:43 +02:00
.main--no-padding {
padding-left: 0;
padding-right: 0;
2018-08-14 05:52:09 +02:00
padding-top: 0;
2018-03-26 23:32:43 +02:00
margin: 0;
}
.main--extra-padding {
padding-left: 100px;
padding-right: 100px;
}
.main--for-content {
padding: $spacing-width * 2/3;
display: flex;
2018-07-25 20:21:41 +02:00
justify-content: center;
}
2018-03-26 23:32:43 +02:00
.page__header {
padding: $spacing-vertical * 2/3;
padding-bottom: 0;
}
.page__title {
// not currently using page titles on any page
}
.page__empty {
margin-top: 200px;
text-align: center;
font-family: 'metropolis-medium';
display: flex;
flex-direction: column;
align-items: center;
2018-03-26 23:32:43 +02:00
}
.columns {
display: flex;
justify-content: space-between;
> * {
flex-grow: 1;
flex-basis: 0;
&:not(:first-of-type):not(:last-of-type) {
margin: 0 $spacing-vertical / 3;
}
&:first-of-type {
margin-right: $spacing-vertical / 3;
}
&:last-of-type {
margin-left: $spacing-vertical / 3;
}
}
2016-04-24 10:59:55 +02:00
}
2018-03-26 23:32:43 +02:00
/* Custom text selection */
*::selection {
2018-07-28 22:17:06 +02:00
background: var(--text-selection-bg);
2018-03-26 23:32:43 +02:00
color: var(--text-selection-color);
}
.credit-amount {
2018-05-01 20:14:49 +02:00
font-size: 10px;
2018-05-16 04:32:45 +02:00
white-space: nowrap;
2018-03-26 23:32:43 +02:00
}
.credit-amount--large {
font-family: 'metropolis-semibold';
font-size: 36px;
}
2018-07-25 20:21:41 +02:00
.credit-amount--file-page {
2018-08-09 18:41:14 +02:00
font-family: 'metropolis-bold';
2018-07-25 20:21:41 +02:00
border-radius: 5px;
padding: 5px;
}
2018-03-26 23:32:43 +02:00
.credit-amount--free {
2018-08-03 20:28:11 +02:00
color: var(--color-credit-free);
&.credit-amount--file-page {
color: var(--color-dark-blue);
background-color: var(--color-secondary);
}
2018-03-26 23:32:43 +02:00
}
.credit-amount--cost {
2018-08-03 20:28:11 +02:00
color: var(--color-credit-price);
&.credit-amount--file-page {
color: var(--color-black);
background-color: var(--color-yellow);
}
2018-03-26 23:32:43 +02:00
}
.credit-amount--inherit {
2018-03-26 23:32:43 +02:00
background-color: inherit;
color: inherit;
font-weight: inherit;
font-size: inherit;
font-family: 'metropolis-medium';
padding: 0;
2018-03-26 23:32:43 +02:00
}
.divider__horizontal {
border-top: var(--color-divider);
margin: 16px 0;
}
.hidden {
display: none;
}
.disabled {
pointer-events: none;
2017-08-17 06:53:37 +02:00
opacity: 0.5;
}
2018-07-17 19:43:43 +02:00
.column {
display: flex;
2018-07-18 17:55:17 +02:00
2018-07-17 19:43:43 +02:00
.column__item:not(:first-child) {
padding-left: $spacing-width * 2/3;
}
}
.truncated-text {
//display: inline-block;
display: -webkit-box;
overflow: hidden;
-webkit-box-orient: vertical;
}
.busy-indicator {
2018-03-26 23:32:43 +02:00
font-family: 'metropolis-medium';
}
.busy-indicator__loader {
2017-12-06 17:32:21 +01:00
background: url('../../../static/img/busy.gif') no-repeat center center;
display: inline-block;
margin: -1em 0;
min-width: 16px;
min-height: 8px;
vertical-align: middle;
padding: 0 30px;
&:last-child {
padding-right: 2px;
}
&:first-child {
padding-left: 2px;
}
}
.help {
2018-03-26 23:32:43 +02:00
font-size: 12px;
font-family: 'metropolis-medium';
2017-08-18 07:37:35 +02:00
color: var(--color-help);
}
2018-03-26 23:32:43 +02:00
.help--padded {
padding-top: $spacing-vertical * 2/3;
}
.meta {
2018-03-26 23:32:43 +02:00
font-family: 'metropolis-medium';
2018-09-26 19:48:07 +02:00
font-size: 0.8em;
2017-08-18 07:37:35 +02:00
color: var(--color-meta-light);
2016-08-08 06:47:48 +02:00
}
.empty {
color: var(--color-meta-light);
font-style: italic;
}
.qr-code {
2018-06-13 17:43:04 +02:00
border: 3px solid var(--color-white);
height: 134px;
width: 134px;
&.qr-code--right-padding {
2018-06-13 17:43:04 +02:00
margin-right: $spacing-vertical * 2/3;
}
&.qr-code--top-padding {
2018-06-13 17:43:04 +02:00
margin-top: $spacing-vertical * 2/3;
}
}
2018-07-18 21:48:30 +02:00
.error-text {
color: var(--color-error);
}
2018-07-17 19:43:43 +02:00
.thumbnail-preview {
2018-07-18 17:55:17 +02:00
height: var(--thumbnail-preview-height);
width: var(--thumbnail-preview-width);
2018-10-12 00:57:00 +02:00
background-size: cover;
background-repeat: no-repeat;
background-position: 50% 50%;
2018-07-17 19:43:43 +02:00
}