X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fsass%2Fbootstrap.scss;h=97f72c41fedf55ac8b2849b6a2c9c6413ca63a64;hb=d8100ba619b73d33a15de3c02b695997f1766c0a;hp=b4a6b86799272b35ea16b798c9188a3c9dfcde57;hpb=1fef6bccd939842408fdd666cc72fed9f2ef6456;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/sass/bootstrap.scss b/client/src/sass/bootstrap.scss index b4a6b8679..97f72c41f 100644 --- a/client/src/sass/bootstrap.scss +++ b/client/src/sass/bootstrap.scss @@ -1,5 +1,3 @@ -$icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; - @use '_variables' as *; @use '_mixins' as *; @@ -7,6 +5,7 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; @import '~bootstrap/scss/functions'; @import '~bootstrap/scss/variables'; +@import '~bootstrap/scss/maps'; @import '~bootstrap/scss/mixins'; @import '~bootstrap/scss/utilities'; @@ -26,15 +25,14 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; @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'; - -// Thanks https://gist.github.com/alexandrevicenzi/680147013e902a4eaa5d -.glyphicon-refresh-animate { - animation: spin 0.7s infinite linear; +.accordion { + --bs-accordion-color: #{pvar(--mainForegroundColor)}; + --bs-accordion-bg: #{pvar(--mainBackgroundColor)}; } .flex-auto { @@ -45,26 +43,17 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; cursor: pointer !important; } -@keyframes spin { - from { - transform: scale(1) rotate(0deg); - } - - to { - transform: scale(1) rotate(360deg); - } -} +// --------------------------------------------------------------------------- +// Dropdown +// --------------------------------------------------------------------------- .dropdown-menu { - font-size: 15px; - color: pvar(--mainForegroundColor); - background-color: pvar(--mainBackgroundColor); - .dropdown-header { @include padding-left(1rem); } .dropdown-item { + color: pvar(--mainForegroundColor); padding: 3px 15px; &.active { @@ -83,6 +72,24 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; } } +.dropdown-divider { + margin: 0.3rem 0; +} + +// --------------------------------------------------------------------------- +// Alert +// --------------------------------------------------------------------------- + +.alert { + p:last-child { + margin-bottom: 0; + } +} + +// --------------------------------------------------------------------------- +// Modal +// --------------------------------------------------------------------------- + @media screen and (min-width: #{breakpoint(md)}) { .modal::before { vertical-align: middle; @@ -121,18 +128,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; } } } @@ -171,14 +170,15 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; opacity: 0.75; content: ''; display: block; - position: fixed; - z-index: z(overlay); } } } } -// Nav customizations +// --------------------------------------------------------------------------- +// Nav +// --------------------------------------------------------------------------- + .nav .nav-link { display: flex !important; align-items: center; @@ -191,7 +191,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, @@ -215,7 +215,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); @@ -231,6 +231,10 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; } } +// --------------------------------------------------------------------------- +// Card, collapse and accordion +// --------------------------------------------------------------------------- + .card { background-color: pvar(--mainBackgroundColor); border-color: #dee2e6; @@ -249,12 +253,29 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; } } -.dropdown-divider { - margin: 0.3rem 0; +.accordion-button { + font-size: 18px; + + &:not(.collapsed) { + font-weight: $font-bold; + + my-global-icon { + color: pvar(--mainColorLighter); + } + } +} + +// --------------------------------------------------------------------------- +// 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, @@ -292,21 +313,10 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; } } -// 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 { @@ -316,7 +326,6 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; } > .input-group-text { - font-size: 15px; line-height: normal; opacity: 0.9; } @@ -332,24 +341,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; } }