From c0ff2291afc083f2496498b5009c6fa41eec3faa Mon Sep 17 00:00:00 2001 From: Rohini-Microsoft Date: Thu, 13 Jun 2024 10:29:44 +0530 Subject: [PATCH 1/2] added borders for constrast mode and fix resizing issue for 1280p --- code/backend/Admin.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code/backend/Admin.py b/code/backend/Admin.py index efa444865..83deeed60 100644 --- a/code/backend/Admin.py +++ b/code/backend/Admin.py @@ -36,6 +36,23 @@ #MainMenu {visibility: hidden;} footer {visibility: hidden;} header {visibility: hidden;} + .st-emotion-cache-1kyxreq{width:100%} + @media screen and (-ms-high-contrast: active), (forced-colors: active) { + section{ + border: 2px solid WindowText;padding: 10px; + background-color: Window; + color: WindowText; + } + } + @media screen and (max-width: 1280px) { + .st-emotion-cache-1wmy9hl .st-emotion-cache-ocqkz7 { + gap: 0rem !important; + } + + .st-emotion-cache-1kyxreq{ + max-width: 200px !important; + } + } """ st.markdown(MOD_PAGE_STYLE, unsafe_allow_html=True) From 4be1904f992defdad584b7b0bc8227b4ca808587 Mon Sep 17 00:00:00 2001 From: Rohini-Microsoft Date: Mon, 17 Jun 2024 12:00:39 +0530 Subject: [PATCH 2/2] added all styles in common.css file --- code/backend/Admin.py | 29 +++++------------------------ code/backend/pages/common.css | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 24 deletions(-) create mode 100644 code/backend/pages/common.css diff --git a/code/backend/Admin.py b/code/backend/Admin.py index 83deeed60..31a4d97fe 100644 --- a/code/backend/Admin.py +++ b/code/backend/Admin.py @@ -31,31 +31,12 @@ menu_items=None, ) -MOD_PAGE_STYLE = """ - ", unsafe_allow_html=True) - .st-emotion-cache-1kyxreq{ - max-width: 200px !important; - } - } - - """ -st.markdown(MOD_PAGE_STYLE, unsafe_allow_html=True) +# Load the common CSS +load_css("pages/common.css") col1, col2, col3 = st.columns([1, 2, 1]) diff --git a/code/backend/pages/common.css b/code/backend/pages/common.css new file mode 100644 index 000000000..f5f2dd332 --- /dev/null +++ b/code/backend/pages/common.css @@ -0,0 +1,20 @@ +#MainMenu {visibility: hidden;} +footer {visibility: hidden;} +header {visibility: hidden;} +.st-emotion-cache-1kyxreq{width:100%} +@media screen and (-ms-high-contrast: active), (forced-colors: active) { + section, .st-emotion-cache-ch5dnh{ + border: 2px solid WindowText;padding: 10px; + background-color: Window; + color: WindowText; + } +} +@media screen and (max-width: 1280px) { + .st-emotion-cache-1wmy9hl .st-emotion-cache-ocqkz7 { + gap: 0rem !important; + } + + .st-emotion-cache-1kyxreq{ + max-width: 200px !important; + } +}