1
0
Fork 0
peertube/client/src/sass/bootstrap.scss

361 lines
6.7 KiB
SCSS
Raw Normal View History

2019-06-12 10:40:24 +00:00
$icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
2021-05-27 16:25:00 +00:00
@use '_variables' as *;
@use '_mixins' as *;
@import './_bootstrap-variables';
@import '~bootstrap/scss/functions';
@import '~bootstrap/scss/variables';
@import '~bootstrap/scss/mixins';
2022-06-08 14:14:24 +00:00
@import '~bootstrap/scss/utilities';
2021-05-27 16:25:00 +00:00
@import '~bootstrap/scss/root';
@import '~bootstrap/scss/reboot';
@import '~bootstrap/scss/type';
@import '~bootstrap/scss/grid';
@import '~bootstrap/scss/forms';
@import '~bootstrap/scss/buttons';
@import '~bootstrap/scss/dropdown';
@import '~bootstrap/scss/button-group';
@import '~bootstrap/scss/nav';
@import '~bootstrap/scss/card';
2022-06-08 14:14:24 +00:00
@import '~bootstrap/scss/accordion';
2021-05-27 16:25:00 +00:00
@import '~bootstrap/scss/alert';
@import '~bootstrap/scss/close';
@import '~bootstrap/scss/modal';
@import '~bootstrap/scss/tooltip';
@import '~bootstrap/scss/popover';
2022-06-08 14:14:24 +00:00
@import '~bootstrap/scss/helpers';
@import '~bootstrap/scss/utilities/api';
2021-05-27 16:25:00 +00:00
@import '~@neos21/bootstrap3-glyphicons/assets/stylesheets/bootstrap3-glyphicons';
2019-06-12 10:40:24 +00:00
// Thanks https://gist.github.com/alexandrevicenzi/680147013e902a4eaa5d
.glyphicon-refresh-animate {
2021-04-28 14:41:07 +00:00
animation: spin 0.7s infinite linear;
2019-06-12 10:40:24 +00:00
}
2020-01-20 14:12:51 +00:00
.flex-auto {
flex: auto;
}
.c-hand {
2022-06-08 14:14:24 +00:00
cursor: pointer !important;
}
2019-06-12 10:40:24 +00:00
@keyframes spin {
2020-01-21 13:28:28 +00:00
from {
transform: scale(1) rotate(0deg);
}
2021-04-28 14:41:07 +00:00
2020-01-21 13:28:28 +00:00
to {
transform: scale(1) rotate(360deg);
}
2019-06-12 10:40:24 +00:00
}
.dropdown-menu {
font-size: 15px;
2022-03-15 13:12:37 +00:00
color: pvar(--mainForegroundColor);
background-color: pvar(--mainBackgroundColor);
.dropdown-header {
2021-06-07 15:38:31 +00:00
@include padding-left(1rem);
}
2019-06-12 10:40:24 +00:00
.dropdown-item {
padding: 3px 15px;
&.active {
color: pvar(--mainBackgroundColor) !important;
background-color: pvar(--mainHoverColor);
2021-04-28 14:41:07 +00:00
opacity: 0.9;
2019-06-12 10:40:24 +00:00
}
&::after {
display: none;
}
2019-06-12 10:40:24 +00:00
}
a {
@include disable-default-a-behaviour;
}
}
@media screen and (min-width: #{breakpoint(md)}) {
2021-04-28 14:41:07 +00:00
.modal::before {
vertical-align: middle;
2021-04-28 14:41:07 +00:00
content: ' ';
height: 100%;
}
.modal-dialog {
2021-06-07 15:38:31 +00:00
text-align: start;
&:not(.modal-lg):not(.modal-xl) {
min-width: 500px;
width: 40vw;
max-width: 900px;
}
}
}
2019-06-12 10:40:24 +00:00
.modal {
text-align: center;
2019-06-12 10:40:24 +00:00
.modal-content {
background-color: pvar(--mainBackgroundColor);
2021-04-26 12:44:15 +00:00
word-break: break-word;
2019-06-12 10:40:24 +00:00
}
.modal-header {
2021-04-28 14:41:07 +00:00
border-bottom: 0;
2019-06-12 10:40:24 +00:00
margin-bottom: 5px;
.modal-title {
font-size: 20px;
font-weight: $font-semibold;
}
my-global-icon {
@include icon(22px);
2019-06-12 10:40:24 +00:00
position: relative;
top: 5px;
2019-06-12 10:40:24 +00:00
float: right;
margin: 0;
padding: 0;
2021-04-28 14:41:07 +00:00
opacity: 0.5;
2021-04-28 14:41:07 +00:00
&[iconName=cross] { /* stylelint-disable-line selector-max-compound-selectors */
@include icon(16px);
2021-04-28 14:41:07 +00:00
top: -3px;
}
2019-06-12 10:40:24 +00:00
}
}
.inputs {
margin-bottom: 0;
2021-06-07 15:38:31 +00:00
text-align: end;
2019-06-12 10:40:24 +00:00
2022-04-20 08:05:21 +00:00
> *:not(:first-child) {
2021-06-07 15:38:31 +00:00
@include margin-left(10px);
2019-06-12 10:40:24 +00:00
}
}
}
// On desktop browsers, make the content and header horizontally sticked to right not move when modal open and close
.modal-open {
overflow-y: scroll !important; // Make sure vertical scroll bar is always visible on desktop browsers to get disabled scrollbar effect
width: 100vw; // Make sure the content fits all the available width
}
// On touchscreen devices, simply overflow: hidden to avoid detached overlay on scroll
@media (hover: none) and (pointer: coarse) {
2021-04-28 14:41:07 +00:00
.modal-open,
.menu-open {
overflow: hidden !important;
}
// On touchscreen devices display content overlay when opened menu
.menu-open {
.main-col {
&::before {
2021-04-28 14:41:07 +00:00
background-color: #000;
width: 100vw;
height: 100vh;
opacity: 0.75;
content: '';
display: block;
position: fixed;
z-index: z(overlay);
}
}
}
}
2019-06-12 10:40:24 +00:00
// Nav customizations
.nav .nav-link {
display: flex !important;
align-items: center;
height: 30px !important;
padding: 10px 15px !important;
}
.nav.nav-pills {
font-size: 16px !important;
font-weight: $font-semibold !important;
2019-06-12 10:40:24 +00:00
.nav-link {
opacity: 0.6 !important;
2021-04-28 14:41:07 +00:00
&.active,
&:hover,
&:active,
&:focus {
opacity: 1 !important;
}
2019-06-12 10:40:24 +00:00
}
a {
@include disable-default-a-behaviour;
color: pvar(--mainForegroundColor);
2019-06-12 10:40:24 +00:00
}
}
.nav-tabs .nav-link {
@include disable-default-a-behaviour;
2019-06-12 10:40:24 +00:00
color: pvar(--mainForegroundColor);
font-weight: $font-semibold;
2021-04-28 14:41:07 +00:00
border: 0;
border-bottom: 2px solid transparent;
opacity: 0.6;
2019-06-12 10:40:24 +00:00
2020-03-06 23:15:49 +00:00
&.active {
color: pvar(--mainForegroundColor);
background-color: pvar(--mainBackgroundColor) !important;
border-bottom-color: pvar(--mainColor);
2020-03-06 23:15:49 +00:00
}
2021-04-28 14:41:07 +00:00
&.active,
&:hover,
&:active,
&:focus {
opacity: 1;
2020-03-06 23:15:49 +00:00
}
2019-06-12 10:40:24 +00:00
}
2019-11-08 17:46:19 +00:00
.card {
background-color: pvar(--mainBackgroundColor);
2019-11-08 17:46:19 +00:00
border-color: #dee2e6;
}
2019-06-12 10:40:24 +00:00
.collapse-transition {
// Animation when we show/hide the filters
transition: max-height 0.3s;
display: block !important;
overflow: hidden !important;
max-height: 0;
&.show {
max-height: 1500px;
overflow: inherit !important;
2019-06-12 10:40:24 +00:00
}
}
.dropdown-divider {
margin: 0.3rem 0;
}
.btn-outline-secondary {
border-color: $input-border-color;
&:focus-within,
&:focus,
&:hover {
color: #fff;
background-color: #6c757d;
}
}
2022-01-03 14:17:17 +00:00
.btn-group.select-button {
2021-12-29 11:14:06 +00:00
font-weight: $font-semibold;
.active {
@include orange-button;
}
:not(.active) {
@include grey-button;
}
> * {
@include peertube-button-link;
box-shadow: none !important;
&:not(:first-child) {
border-top-left-radius: 0 !important;
border-bottom-left-radius: 0 !important;
}
&:not(:last-child) {
border-top-right-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}
}
}
// input box-shadow on focus
.form-control {
font-size: 15px;
color: pvar(--mainForegroundColor);
background-color: pvar(--inputBackgroundColor);
outline: none;
&:focus-within,
&:focus {
box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
&.input-error {
box-shadow: #{$focus-box-shadow-form} #{scale-color($red, $alpha: -75%)};
}
}
}
.input-group {
2022-06-08 14:14:24 +00:00
> .btn,
> .input-group-text {
height: $button-height;
}
2021-04-28 14:41:07 +00:00
2022-06-08 14:14:24 +00:00
> .input-group-text {
font-size: 15px;
line-height: normal;
opacity: 0.9;
}
2022-06-08 14:14:24 +00:00
.input-group-text > .dropdown-toggle {
display: flex;
}
.last-in-group {
border-top-right-radius: 3px !important;
border-bottom-right-radius: 3px !important;
}
}
2022-06-08 14:14:24 +00:00
.has-clear {
position: relative;
input {
2021-06-07 15:38:31 +00:00
@include padding-right(1.5rem !important);
}
.form-control-clear {
color: rgba(0, 0, 0, 0.4);
display: flex;
justify-content: center;
align-items: center;
position: absolute;
right: .5rem;
height: 95%;
2020-07-23 19:30:04 +00:00
font-size: 14px;
&:hover {
color: rgba(0, 0, 0, 0.7);
cursor: pointer;
}
}
input:placeholder-shown + .form-control-clear {
display: none;
}
}