X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fsass%2Fbootstrap.scss;h=d0465218486d93657fc9a0b61935bf19fce694ca;hb=77448fd31c140d87bd8fc60b83f94e5eba2ab682;hp=03b2e8b157489ad498d35bfdd3bb4c26e54d6d68;hpb=a14c176472614874586cbc64cf25e82bbdc52868;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/sass/bootstrap.scss b/client/src/sass/bootstrap.scss index 03b2e8b15..d04652184 100644 --- a/client/src/sass/bootstrap.scss +++ b/client/src/sass/bootstrap.scss @@ -1,37 +1,55 @@ -$icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; - @use '_variables' as *; @use '_mixins' as *; @import './_bootstrap-variables'; -@import '~bootstrap/scss/functions'; -@import '~bootstrap/scss/variables'; -@import '~bootstrap/scss/mixins'; -@import '~bootstrap/scss/utilities'; - -@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'; -@import '~bootstrap/scss/accordion'; -@import '~bootstrap/scss/alert'; -@import '~bootstrap/scss/close'; -@import '~bootstrap/scss/modal'; -@import '~bootstrap/scss/tooltip'; -@import '~bootstrap/scss/popover'; -@import '~bootstrap/scss/spinners'; - -@import '~bootstrap/scss/helpers'; -@import '~bootstrap/scss/utilities/api'; - -@import '~@neos21/bootstrap3-glyphicons/assets/stylesheets/bootstrap3-glyphicons'; +@import 'bootstrap/scss/functions'; +@import 'bootstrap/scss/variables'; +@import 'bootstrap/scss/maps'; +@import 'bootstrap/scss/mixins'; +@import 'bootstrap/scss/utilities'; + +@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/transitions'; +@import 'bootstrap/scss/dropdown'; +@import 'bootstrap/scss/button-group'; +@import 'bootstrap/scss/nav'; +@import 'bootstrap/scss/card'; +@import 'bootstrap/scss/accordion'; +@import 'bootstrap/scss/alert'; +@import 'bootstrap/scss/close'; +@import 'bootstrap/scss/modal'; +@import 'bootstrap/scss/tooltip'; +@import 'bootstrap/scss/popover'; +@import 'bootstrap/scss/spinners'; + +@import 'bootstrap/scss/helpers'; +@import 'bootstrap/scss/utilities/api'; + +body { + --bs-border-color-translucent: #{pvar(--inputBorderColor)}; +} + +.accordion { + --bs-accordion-color: #{pvar(--mainForegroundColor)}; + --bs-accordion-bg: #{pvar(--mainBackgroundColor)}; + + --bs-accordion-btn-color: var(--bs-accordion-color); + --bs-accordion-btn-bg: var(--bs-accordion-bg); +} + +.popover { + --bs-popover-bg: #{pvar(--mainBackgroundColor)}; + --bs-popover-body-color: #{pvar(--mainForegroundColor)}; + --bs-popover-header-color: #{pvar(--mainForegroundColor)}; + + font-family: $main-fonts; +} .flex-auto { flex: auto; @@ -46,9 +64,9 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; // --------------------------------------------------------------------------- .dropdown-menu { - font-size: 15px; - color: pvar(--mainForegroundColor); - background-color: pvar(--mainBackgroundColor); + --bs-dropdown-link-hover-bg: #{pvar(--mainBackgroundHoverColor)}; + --bs-dropdown-link-color: #{pvar(--mainForegroundColor)}; + --bs-dropdown-border-color: #{pvar(--inputBorderColor)}; .dropdown-header { @include padding-left(1rem); @@ -77,6 +95,16 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; margin: 0.3rem 0; } +// --------------------------------------------------------------------------- +// Alert +// --------------------------------------------------------------------------- + +.alert { + p:last-child { + margin-bottom: 0; + } +} + // --------------------------------------------------------------------------- // Modal // --------------------------------------------------------------------------- @@ -119,18 +147,10 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; my-global-icon { @include icon(22px); - position: relative; - top: 5px; - float: right; - - margin: 0; - padding: 0; opacity: 0.5; - &[iconName=cross] { /* stylelint-disable-line selector-max-compound-selectors */ - @include icon(16px); - - top: -3px; + &:hover { + opacity: 0.8; } } } @@ -184,7 +204,6 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; display: flex !important; align-items: center; height: 30px !important; - padding: 10px 15px !important; } .nav.nav-pills { @@ -192,7 +211,7 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; font-weight: $font-semibold !important; .nav-link { - opacity: 0.6 !important; + opacity: 0.7 !important; &.active, &:hover, @@ -216,7 +235,7 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; font-weight: $font-semibold; border: 0; border-bottom: 2px solid transparent; - opacity: 0.6; + opacity: 0.7; &.active { color: pvar(--mainForegroundColor); @@ -241,16 +260,15 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; border-color: #dee2e6; } -.collapse-transition { - // Animation when we show/hide the filters - transition: max-height 0.3s; - display: block !important; - overflow: hidden !important; - max-height: 0; +.accordion-button { + font-size: 18px; - &.show { - max-height: 1500px; - overflow: inherit !important; + &:not(.collapsed) { + font-weight: $font-bold; + + my-global-icon { + color: pvar(--mainColorLighter); + } } } @@ -258,8 +276,13 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; // Buttons & form controls // --------------------------------------------------------------------------- +.btn:not(.btn-sm) { + font-size: $button-font-size; + line-height: 1.2; +} + .btn-outline-secondary { - border-color: $input-border-color; + border-color: pvar(--inputBorderColor); &:focus-within, &:focus, @@ -298,30 +321,19 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; } .form-control { - font-size: 15px; color: pvar(--mainForegroundColor); background-color: pvar(--inputBackgroundColor); outline: none; - - // Input box-shadow on focus - &: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 { > .btn, > .input-group-text { - height: $button-height; + padding-top: 4px; + padding-bottom: 4px; } > .input-group-text { - font-size: 15px; line-height: normal; opacity: 0.9; } @@ -329,7 +341,10 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; .input-group-text > .dropdown-toggle { display: flex; } +} +.input-group, +.btn-group { .last-in-group { border-top-right-radius: 3px !important; border-bottom-right-radius: 3px !important; @@ -337,24 +352,22 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; } .has-clear { - position: relative; - input { @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%; font-size: 14px; + position: absolute; + right: .5rem; + opacity: 0.4; &:hover { - color: rgba(0, 0, 0, 0.7); + opacity: 0.7; cursor: pointer; } } @@ -363,3 +376,8 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; display: none; } } + +.text-truncate { + // Prevent invalid height in parent: https://stackoverflow.com/a/22425601 + vertical-align: top; +}