diff --git a/apps/theming/css/default.css b/apps/theming/css/default.css index ad5b27530c3..6a6628f074a 100644 --- a/apps/theming/css/default.css +++ b/apps/theming/css/default.css @@ -74,8 +74,15 @@ --clickable-area-large: 48px; --clickable-area-small: 24px; --default-grid-baseline: 4px; + --header-height: 50px; --header-menu-item-height: 44px; + /* An alpha mask to be applied to all icons on the navigation bar (header menu). + * Icons are have a size of 20px but usually we use MDI which have a content of 16px so 2px padding top bottom, + * for better gradient we set those 2px (10% of height) as start and stop positions, this is also somewhat size agnostic as we only depend on the percentage. + */ + --header-menu-icon-mask: linear-gradient(var(--color-background-plain-text) 10%, color-mix(in srgb, var(--color-background-plain-text), 25% transparent) 90%) alpha; + --navigation-width: 300px; --sidebar-min-width: 300px; --sidebar-max-width: 500px; diff --git a/apps/theming/lib/Themes/DefaultTheme.php b/apps/theming/lib/Themes/DefaultTheme.php index 1a301eb9820..7d06926c52f 100644 --- a/apps/theming/lib/Themes/DefaultTheme.php +++ b/apps/theming/lib/Themes/DefaultTheme.php @@ -191,9 +191,16 @@ class DefaultTheme implements ITheme { '--default-grid-baseline' => '4px', - // various structure data + // header / navigation bar '--header-height' => '50px', '--header-menu-item-height' => '44px', + /* An alpha mask to be applied to all icons on the navigation bar (header menu). + * Icons are have a size of 20px but usually we use MDI which have a content of 16px so 2px padding top bottom, + * for better gradient we set those 2px (10% of height) as start and stop positions, this is also somewhat size agnostic as we only depend on the percentage. + */ + '--header-menu-icon-mask' => 'linear-gradient(var(--color-background-plain-text) 10%, color-mix(in srgb, var(--color-background-plain-text), 25% transparent) 90%) alpha', + + // various structure data '--navigation-width' => '300px', '--sidebar-min-width' => '300px', '--sidebar-max-width' => '500px', diff --git a/apps/theming/lib/Themes/HighContrastTheme.php b/apps/theming/lib/Themes/HighContrastTheme.php index 1d20ae251df..5b51114a32f 100644 --- a/apps/theming/lib/Themes/HighContrastTheme.php +++ b/apps/theming/lib/Themes/HighContrastTheme.php @@ -106,6 +106,9 @@ class HighContrastTheme extends DefaultTheme implements ITheme { '--color-border' => $this->util->darken($colorMainBackground, 50), '--color-border-dark' => $this->util->darken($colorMainBackground, 50), '--color-border-maxcontrast' => $this->util->darken($colorMainBackground, 56), + + // remove the gradient from the app icons + '--header-menu-icon-mask' => 'none', ] ); } diff --git a/core/css/header.scss b/core/css/header.scss index 722a743df6a..dc50065e579 100644 --- a/core/css/header.scss +++ b/core/css/header.scss @@ -85,10 +85,8 @@ max-height: calc(100vh - #{variables.$header-height} - 8px); } +/* Header menu */ #header { - /* Header menu */ - $header-menu-entry-height: 44px; - .header-end > div > .menu { background-color: var(--color-main-background); filter: drop-shadow(0 1px 5px var(--color-box-shadow)); diff --git a/core/src/components/AppMenuIcon.vue b/core/src/components/AppMenuIcon.vue index 089a2016e58..228e00eb746 100644 --- a/core/src/components/AppMenuIcon.vue +++ b/core/src/components/AppMenuIcon.vue @@ -51,6 +51,7 @@ $unread-indicator-size: 10px; height: $icon-size; width: $icon-size; filter: var(--background-image-invert-if-bright); + mask: var(--header-menu-icon-mask); } &__unread {