From 4c8749cb9e1e4a8d61697434e372f342def7bc70 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 8 Jun 2022 16:14:24 +0200 Subject: Migrate to bootstrap 5 --- client/src/sass/include/_badges.scss | 61 ++++++++++++++++++++++ client/src/sass/include/_bootstrap-variables.scss | 10 +++- client/src/sass/include/_mixins.scss | 62 ++--------------------- client/src/sass/include/_variables.scss | 1 + 4 files changed, 75 insertions(+), 59 deletions(-) create mode 100644 client/src/sass/include/_badges.scss (limited to 'client/src/sass/include') diff --git a/client/src/sass/include/_badges.scss b/client/src/sass/include/_badges.scss new file mode 100644 index 000000000..4bc70d4a9 --- /dev/null +++ b/client/src/sass/include/_badges.scss @@ -0,0 +1,61 @@ +@use '_variables' as *; +@use '_mixins' as *; + +@mixin peertube-badge { + display: inline-block; + border-radius: .25rem; + padding: .25em .4em; + font-size: 75%; + font-weight: $font-semibold; + line-height: 1.1; + + &.badge-primary { + color: pvar(--mainBackgroundColor); + background-color: pvar(--mainColor); + } + + &.badge-secondary { + color: pvar(--mainBackgroundColor); + background-color: pvar(--greyForegroundColor); + opacity: 0.7; + } + + &.badge-banned, + &.badge-danger, + &.badge-red { + background-color: #ffcdd2; + color: #c63737; + } + + &.badge-banned { + text-decoration: line-through; + } + + &.badge-yellow, + &.badge-warning { + background-color: #feedaf; + color: #8a5340; + } + + &.badge-brown { + background-color: #ffd8b2; + color: #805b36; + } + + &.badge-green, + &.badge-success { + background-color: #c8e6c9; + color: #256029; + } + + &.badge-blue, + &.badge-info { + background-color: #b3e5fc; + color: #23547b; + } + + &.badge-purple { + background-color: #eccfff; + color: #694382; + } +} diff --git a/client/src/sass/include/_bootstrap-variables.scss b/client/src/sass/include/_bootstrap-variables.scss index 41a1448c4..c103e485a 100644 --- a/client/src/sass/include/_bootstrap-variables.scss +++ b/client/src/sass/include/_bootstrap-variables.scss @@ -1,4 +1,4 @@ -$dropdown-link-active-bg: inherit; +@use '_variables' as *; $modal-footer-border-width: 0; $modal-md: 600px; @@ -40,3 +40,11 @@ $input-focus-border-color: #ced4da; $nav-pills-link-active-bg: #F0F0F0; $nav-pills-link-active-color: #000; + +$dropdown-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2); +$dropdown-border-radius: 3px; +$dropdown-link-active-color: pvar(--mainForegroundColor); +$dropdown-link-active-bg: pvar(--mainBackgroundHoverColor); + +$accordion-button-active-bg: pvar(--mainColorLightest); +$accordion-button-active-color: pvar(--mainForegroundColor); diff --git a/client/src/sass/include/_mixins.scss b/client/src/sass/include/_mixins.scss index 8de23e64d..8545824e3 100644 --- a/client/src/sass/include/_mixins.scss +++ b/client/src/sass/include/_mixins.scss @@ -89,6 +89,7 @@ display: inline-block; height: $button-height; width: $width; + max-width: $width; color: pvar(--inputForegroundColor); background-color: pvar(--inputBackgroundColor); border: 1px solid #C6C6C6; @@ -108,19 +109,6 @@ } } -@mixin peertube-input-group($width) { - width: $width; - min-height: $button-height; - padding-top: 0; - padding-bottom: 0; - flex-wrap: nowrap; - - .input-group-text { - font-size: 14px; - color: #808080; - } -} - @mixin peertube-textarea ($width, $height) { @include peertube-input-text($width); @@ -371,6 +359,7 @@ cursor: default; } } + select[disabled] { background-color: #f9f9f9; } @@ -550,50 +539,6 @@ } } -@mixin peertube-badge { - border-radius: 2px; - padding: 1/4em 1/2em; - text-transform: uppercase; - font-weight: $font-bold; - font-size: 12px; - letter-spacing: 1/3px; - - &.badge-banned, - &.badge-red { - background-color: #ffcdd2; - color: #c63737; - } - - &.badge-banned { - text-decoration: line-through; - } - - &.badge-yellow { - background-color: #feedaf; - color: #8a5340; - } - - &.badge-brown { - background-color: #ffd8b2; - color: #805b36; - } - - &.badge-green { - background-color: #c8e6c9; - color: #256029; - } - - &.badge-blue { - background-color: #b3e5fc; - color: #23547b; - } - - &.badge-purple { - background-color: #eccfff; - color: #694382; - } -} - @mixin actor-avatar-size ($size) { display: inline-block; width: $size; @@ -937,8 +882,9 @@ vertical-align: top; } - .badge { + .pt-badge { @include margin-left(7px); + vertical-align: top; } } diff --git a/client/src/sass/include/_variables.scss b/client/src/sass/include/_variables.scss index fd1b137dc..41ae60290 100644 --- a/client/src/sass/include/_variables.scss +++ b/client/src/sass/include/_variables.scss @@ -1,4 +1,5 @@ @use 'sass:math'; +@use '~bootstrap/scss/functions' as *; $small-view: 800px; $mobile-view: 500px; -- cgit v1.2.3