From 38e948a1ad461207ccbd108951e617e5d0a80ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=A4ggmark?= Date: Tue, 17 Sep 2019 23:58:08 -0700 Subject: [PATCH] Dashboard: Fixes back button styles in kiosk mode (#19165) Fixes: #18114 --- .../grafana-ui/src/themes/_variables.scss.tmpl.ts | 1 + public/sass/_variables.generated.scss | 1 + public/sass/components/_navbar.scss | 2 +- public/sass/components/_view_states.scss | 15 +++++++++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts b/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts index f8e597ae4e8..32e1d5db5f4 100644 --- a/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts +++ b/packages/grafana-ui/src/themes/_variables.scss.tmpl.ts @@ -193,6 +193,7 @@ $btn-semi-transparent: rgba(0, 0, 0, 0.2) !default; // sidemenu $side-menu-width: 60px; +$navbar-padding: 20px; // dashboard $dashboard-padding: $space-md; diff --git a/public/sass/_variables.generated.scss b/public/sass/_variables.generated.scss index 09f87e7d8ec..87b7d4c313d 100644 --- a/public/sass/_variables.generated.scss +++ b/public/sass/_variables.generated.scss @@ -196,6 +196,7 @@ $btn-semi-transparent: rgba(0, 0, 0, 0.2) !default; // sidemenu $side-menu-width: 60px; +$navbar-padding: 20px; // dashboard $dashboard-padding: $space-md; diff --git a/public/sass/components/_navbar.scss b/public/sass/components/_navbar.scss index b174129173d..5e5091b52c7 100644 --- a/public/sass/components/_navbar.scss +++ b/public/sass/components/_navbar.scss @@ -46,7 +46,7 @@ .panel-in-fullscreen { .navbar { - padding-left: 20px; + padding-left: $navbar-padding; } .navbar-button--add-panel, diff --git a/public/sass/components/_view_states.scss b/public/sass/components/_view_states.scss index fbc50cfca3c..dff5bc78f41 100644 --- a/public/sass/components/_view_states.scss +++ b/public/sass/components/_view_states.scss @@ -14,6 +14,10 @@ i { opacity: 0; } + + i.navbar-page-btn__folder-icon { + opacity: inherit; + } } .navbar-button--zoom { @@ -25,6 +29,17 @@ @extend .view-mode--inactive; } +// https://github.com/grafana/grafana/issues/18114 +.view-mode--tv.panel-in-fullscreen { + .navbar { + padding-left: $navbar-padding; + } + + .navbar-page-btn { + transform: none; + } +} + .view-mode--tv { @extend .view-mode--inactive;