aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dashboard/css
diff options
context:
space:
mode:
authorJan C. Borchardt <hey@jancborchardt.net>2020-08-24 21:16:31 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2020-08-25 20:30:43 +0200
commitc8d92ba6f9a1cc1d6bb29171fab1230fe2ee2823 (patch)
treec73e8b1cfe26377642fa0825b29a47ee154bde21 /apps/dashboard/css
parentfe3374d843ed0dcd756c798db128dbfbb8ad0f58 (diff)
downloadnextcloud-server-c8d92ba6f9a1cc1d6bb29171fab1230fe2ee2823.tar.gz
nextcloud-server-c8d92ba6f9a1cc1d6bb29171fab1230fe2ee2823.zip
Add shadow behind navigation when Dashboard is scrolled
Signed-off-by: Jan C. Borchardt <hey@jancborchardt.net>
Diffstat (limited to 'apps/dashboard/css')
-rw-r--r--apps/dashboard/css/dashboard.scss40
1 files changed, 34 insertions, 6 deletions
diff --git a/apps/dashboard/css/dashboard.scss b/apps/dashboard/css/dashboard.scss
index b79b52eae13..c9dabc9ce46 100644
--- a/apps/dashboard/css/dashboard.scss
+++ b/apps/dashboard/css/dashboard.scss
@@ -1,11 +1,39 @@
-// Show Dashboard background image beneath header
-#body-user #header {
- background-size: cover !important;
- background-position: center 50% !important;
- background-repeat: no-repeat !important;
- background-attachment: fixed !important;
+#header {
+ background: transparent !important;
+ --color-header: rgba(24, 24, 24, 1);
+
+ #body-user.dashboard--dark & {
+ --color-header: rgba(255, 255, 255, 1);
+ }
+
+ // Show gradient below navigation for visibility of icons when scrolled
+ &:before {
+ content: ' ';
+ display: block;
+ position: absolute;
+ background-image: linear-gradient(180deg, var(--color-header) 0%, transparent 100%);
+ width: 100%;
+ height: 70px;
+ top: 0;
+ margin-top: -70px;
+ transition: margin-top var(--animation-slow);
+
+ #body-user.dashboard--scrolled & {
+ margin-top: 0;
+ }
+ }
+
+ // Use flat color instead of gradient for high contrast theme
+ #body-user.theme--highcontrast & {
+ background-color: var(--color-header) !important;
+
+ &:before {
+ display: none;
+ }
+ }
}
+// Move content up so it scrolls below navigation
#content {
padding-top: 0 !important;
}