lbry-desktop/src/renderer/scss/component/_button.scss

161 lines
2.6 KiB
SCSS
Raw Normal View History

2018-03-26 23:32:43 +02:00
.btn {
fill: currentColor;
2018-10-17 19:14:24 +02:00
position: relative;
2019-01-09 03:21:36 +01:00
svg {
stroke-width: 1.5;
2019-01-09 18:53:05 +01:00
width: 1.2rem;
height: 1.2rem;
2019-01-09 03:21:36 +01:00
position: relative;
top: 0.1rem;
2019-01-09 03:21:36 +01:00
}
.btn__label {
margin: 0;
}
svg + .btn__label {
margin-left: var(--spacing-vertical-small);
}
}
2018-01-04 06:05:20 +01:00
.btn--alt {
2018-03-26 23:32:43 +02:00
&:hover {
text-decoration: underline;
2017-04-09 17:06:23 +02:00
}
}
2018-03-26 23:32:43 +02:00
.btn--constrict {
@include constrict;
}
2018-03-26 23:32:43 +02:00
.btn--disabled {
opacity: 0.3;
}
.btn--external-link,
.btn--link {
transition: color 0.2s;
2018-03-26 23:32:43 +02:00
&:not(.btn--disabled):not(:hover) {
color: $lbry-teal-5;
html[data-theme='dark'] & {
color: $lbry-teal-3;
2018-10-17 19:14:24 +02:00
}
}
2018-03-26 23:32:43 +02:00
&:not(.btn--disabled):hover {
color: $lbry-teal-3;
2017-04-09 17:06:23 +02:00
html[data-theme='dark'] & {
color: $lbry-teal-4;
2018-10-17 19:14:24 +02:00
}
}
}
2018-03-26 23:32:43 +02:00
.btn--external-link {
font-weight: 500;
text-align: left;
}
2018-10-19 22:38:07 +02:00
2019-01-09 18:53:05 +01:00
// Large icons used for play/view on the file page
.btn--icon {
width: 5rem;
height: 5rem;
2018-10-19 22:38:07 +02:00
background-repeat: no-repeat;
background-size: 50%;
border-radius: 50%;
color: $lbry-white;
transition: background-color 0.2s;
2018-03-26 23:32:43 +02:00
&:not(:hover) {
background-color: rgba($lbry-black, 0.7);
}
2018-03-26 23:32:43 +02:00
// The play icon looks a little weird without this
.btn--play {
padding-left: 0.25rem;
2018-10-17 19:14:24 +02:00
}
2018-03-26 23:32:43 +02:00
.btn__label {
display: none;
2017-10-03 04:25:44 +02:00
}
2019-01-09 03:21:36 +01:00
svg {
width: 3rem;
height: 3rem;
margin-right: 0;
position: relative;
top: 0.1rem;
}
}
2017-04-09 17:06:23 +02:00
.btn--inverse {
border: 1px solid $lbry-gray-1;
border-radius: 1rem;
color: inherit;
font-size: 1rem;
padding: var(--spacing-vertical-miniscule) var(--spacing-vertical-medium);
transition: background-color 0.2s;
2018-03-26 23:32:43 +02:00
html[data-theme='dark'] & {
border-color: rgba($lbry-white, 0.1);
}
2017-08-19 03:46:45 +02:00
&:not(:hover) {
background-color: transparent;
}
2018-03-26 23:32:43 +02:00
&:hover {
background-color: $lbry-gray-1;
2019-01-09 03:21:36 +01:00
color: $lbry-black;
2017-04-09 17:06:23 +02:00
html[data-theme='dark'] & {
background-color: rgba($lbry-white, 0.1);
2018-10-17 19:14:24 +02:00
}
2018-03-26 23:32:43 +02:00
}
2017-04-09 17:06:23 +02:00
2019-01-09 03:21:36 +01:00
.btn__content {
svg {
color: $lbry-gray-4;
}
2018-10-17 19:14:24 +02:00
}
}
2018-03-26 23:32:43 +02:00
.btn--load-screen {
border-bottom: 1px solid $lbry-white;
display: inline-block;
2018-03-26 23:32:43 +02:00
&:hover {
border-bottom: 1px solid $lbry-blue-1;
color: $lbry-blue-1;
2018-10-17 19:14:24 +02:00
}
}
2018-04-17 04:21:19 +02:00
.btn--primary {
align-self: center; // fixes buttons next to tall elements inside one with `display: flex`
border-radius: 1rem;
color: $lbry-white;
padding: var(--spacing-vertical-miniscule) var(--spacing-vertical-medium);
transition: background-color 0.2s;
2018-03-26 23:32:43 +02:00
&:not(:hover) {
background-color: $lbry-teal-5;
2018-03-26 23:32:43 +02:00
}
&:hover {
background-color: $lbry-teal-3;
2018-11-08 20:48:38 +01:00
html[data-theme='dark'] & {
background-color: $lbry-teal-4;
2018-11-08 20:48:38 +01:00
}
}
}
2018-01-04 06:05:20 +01:00
.btn--uppercase {
text-transform: uppercase;
2017-04-09 17:06:23 +02:00
}