From bff7831912b6b96ab3beabf96b9a773c6f41e7df Mon Sep 17 00:00:00 2001 From: June Zhang Date: Thu, 22 Mar 2018 18:18:51 +0800 Subject: [PATCH] KEYCLOAK-6942 Cut off background on the new login page --- .../theme/rh-sso/login/resources/css/login-rhsso.css | 9 +++++++-- .../theme/keycloak/login/resources/css/login.css | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/themes/src/main/resources-product/theme/rh-sso/login/resources/css/login-rhsso.css b/themes/src/main/resources-product/theme/rh-sso/login/resources/css/login-rhsso.css index 71f67599ae..3e1d2de54c 100644 --- a/themes/src/main/resources-product/theme/rh-sso/login/resources/css/login-rhsso.css +++ b/themes/src/main/resources-product/theme/rh-sso/login/resources/css/login-rhsso.css @@ -1,6 +1,6 @@ .login-pf body { - background-image: url(../node_modules/rcue/dist/img/bg-login.png); - background-size: auto; + background: url("../node_modules/rcue/dist/img/bg-login.png") no-repeat left top fixed; + background-size: auto; } @media (max-width: 767px) { @@ -11,3 +11,8 @@ background-color: white; } } +@media (min-width: 767px) { + .login-pf { + background-attachment: fixed; + } +} diff --git a/themes/src/main/resources/theme/keycloak/login/resources/css/login.css b/themes/src/main/resources/theme/keycloak/login/resources/css/login.css index 6813ecf91b..32ad9cb07f 100644 --- a/themes/src/main/resources/theme/keycloak/login/resources/css/login.css +++ b/themes/src/main/resources/theme/keycloak/login/resources/css/login.css @@ -1,5 +1,5 @@ .login-pf body { - background-image: url("../img/keycloak-bg.png"); + background: url("../img/keycloak-bg.png") no-repeat center center fixed; background-size: cover; }