From c6589ee1b44b9559221cae39474b0aa316359f56 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Wed, 18 Sep 2024 11:26:10 +0200 Subject: [PATCH] Browser Steps - UI - Use a better flexbox layout --- .../styles/scss/parts/_browser-steps.scss | 22 +++++++++++--- changedetectionio/static/styles/styles.css | 29 ++++++++++++++----- changedetectionio/templates/edit.html | 4 +-- 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/changedetectionio/static/styles/scss/parts/_browser-steps.scss b/changedetectionio/static/styles/scss/parts/_browser-steps.scss index f8e8914d..a5a03de6 100644 --- a/changedetectionio/static/styles/scss/parts/_browser-steps.scss +++ b/changedetectionio/static/styles/scss/parts/_browser-steps.scss @@ -40,15 +40,29 @@ } } -#browser-steps-fieldlist { - height: 100%; - overflow-y: scroll; -} #browser-steps .flex-wrapper { display: flex; flex-flow: row; height: 70vh; + font-size: 80%; + #browser-steps-ui { + flex-grow: 1; /* Allow it to grow and fill the available space */ + flex-shrink: 1; /* Allow it to shrink if needed */ + flex-basis: 0; /* Start with 0 base width so it stretches as much as possible */ + background-color: #eee; + border-radius: 5px; + + } + + #browser-steps-fieldlist { + flex-grow: 0; /* Don't allow it to grow */ + flex-shrink: 0; /* Don't allow it to shrink */ + flex-basis: auto; /* Base width is determined by the content */ + max-width: 400px; /* Set a max width to prevent overflow */ + padding-left: 1rem; + overflow-y: scroll; + } } /* this is duplicate :( */ diff --git a/changedetectionio/static/styles/styles.css b/changedetectionio/static/styles/styles.css index 4f3fec10..b9a3c240 100644 --- a/changedetectionio/static/styles/styles.css +++ b/changedetectionio/static/styles/styles.css @@ -46,14 +46,31 @@ #browser_steps li > label { display: none; } -#browser-steps-fieldlist { - height: 100%; - overflow-y: scroll; } - #browser-steps .flex-wrapper { display: flex; flex-flow: row; - height: 70vh; } + height: 70vh; + font-size: 80%; } + #browser-steps .flex-wrapper #browser-steps-ui { + flex-grow: 1; + /* Allow it to grow and fill the available space */ + flex-shrink: 1; + /* Allow it to shrink if needed */ + flex-basis: 0; + /* Start with 0 base width so it stretches as much as possible */ + background-color: #eee; + border-radius: 5px; } + #browser-steps .flex-wrapper #browser-steps-fieldlist { + flex-grow: 0; + /* Don't allow it to grow */ + flex-shrink: 0; + /* Don't allow it to shrink */ + flex-basis: auto; + /* Base width is determined by the content */ + max-width: 400px; + /* Set a max width to prevent overflow */ + padding-left: 1rem; + overflow-y: scroll; } /* this is duplicate :( */ #browsersteps-selector-wrapper { @@ -1194,11 +1211,9 @@ ul { color: #fff; opacity: 0.7; } - .restock-label svg { vertical-align: middle; } - #chrome-extension-link { padding: 9px; border: 1px solid var(--color-grey-800); diff --git a/changedetectionio/templates/edit.html b/changedetectionio/templates/edit.html index c5cc9725..8ce58755 100644 --- a/changedetectionio/templates/edit.html +++ b/changedetectionio/templates/edit.html @@ -200,7 +200,7 @@ User-Agent: wonderbra 1.0") }}
-
+
@@ -215,7 +215,7 @@ User-Agent: wonderbra 1.0") }}
-
+
Loading (?) {{ render_field(form.browser_steps) }}