N°2847 - Add style for scrollbars throughout the whole application, not only the nav. menu

This commit is contained in:
Molkobain
2021-01-20 19:01:10 +01:00
parent e440667d69
commit 4816d1e943
2 changed files with 45 additions and 14 deletions

View File

@@ -16,6 +16,12 @@
* You should have received a copy of the GNU Affero General Public License
*/
$ibo-scrollbar--scrollbar-width: 8px !default;
$ibo-scrollbar--scrollbar-track-background-color: $ibo-color-transparent !default;
$ibo-scrollbar--scrollbar-thumb-background-color: $ibo-color-grey-300 !default;
$ibo-scrollbar--scrollbar-thumb-border: none !default;
$ibo-scrollbar--scrollbar-thumb-border-radius: $ibo-border-radius-500 !default;
$ibo-hyperlink-color: $ibo-color-primary-500 !default;
$ibo-hyperlink-color--on-hover: $ibo-color-primary-600 !default;
$ibo-hyperlink-color--on-active: $ibo-color-primary-700 !default;
@@ -27,6 +33,12 @@ $ibo-content-block--border: 1px solid $ibo-color-grey-400 !default;
/* CSS variables */
:root{
--ibo-scrollbar--scrollbar-width: #{$ibo-scrollbar--scrollbar-width};
--ibo-scrollbar--scrollbar-track-background-color: #{$ibo-scrollbar--scrollbar-track-background-color};
--ibo-scrollbar--scrollbar-thumb-background-color: #{$ibo-scrollbar--scrollbar-thumb-background-color};
--ibo-scrollbar--scrollbar-thumb-border: #{$ibo-scrollbar--scrollbar-thumb-border};
--ibo-scrollbar--scrollbar-thumb-border-radius: #{$ibo-scrollbar--scrollbar-thumb-border-radius};
--ibo-hyperlink-color: #{$ibo-hyperlink-color};
--ibo-hyperlink-color--on-hover: #{$ibo-hyperlink-color--on-hover};
--ibo-hyperlink-color--on-active: #{$ibo-hyperlink-color--on-active};
@@ -39,6 +51,27 @@ $ibo-content-block--border: 1px solid $ibo-color-grey-400 !default;
box-sizing: border-box;
}
/* Scrollbar reset */
*{
/* - For Firefox and future W3C specs. */
scrollbar-width: thin;
scrollbar-color: var(--ibo-scrollbar--scrollbar-thumb-background-color) var(--ibo-scrollbar--scrollbar-track-background-color);
/* - For Chrome/Edge/Safari */
&::-webkit-scrollbar {
width: var(--ibo-scrollbar--scrollbar-width);
}
&::-webkit-scrollbar-track {
background-color: var(--ibo-scrollbar--scrollbar-track-background-color);
}
::-webkit-scrollbar-thumb {
background-color: var(--ibo-scrollbar--scrollbar-thumb-background-color);
border: var(--ibo-scrollbar--scrollbar-thumb-border);
border-radius: var(--ibo-scrollbar--scrollbar-thumb-border-radius);
}
}
/* Base font size (used by all typographies) */
html{
font-size: 12px;