From e7031cea908873e66eaa282dadd10bbf636dff5f Mon Sep 17 00:00:00 2001 From: schlagmichdoch Date: Sat, 9 Dec 2023 17:37:44 +0100 Subject: [PATCH] Flex-wrap buttons on dialogs to prevent overflowing --- public/index.html | 30 +++++++++++++------------- public/styles/deferred-styles.css | 25 +++++++++++++--------- public/styles/styles-main.css | 35 ++++++++++++++++++++++++------- 3 files changed, 59 insertions(+), 31 deletions(-) diff --git a/public/index.html b/public/index.html index a07981d..fecc9eb 100644 --- a/public/index.html +++ b/public/index.html @@ -131,7 +131,7 @@ -
+
@@ -165,7 +165,7 @@
-
+
@@ -251,7 +251,7 @@ (Japanese)
-
+
@@ -294,7 +294,7 @@

-
+
@@ -318,7 +318,7 @@

-
+
@@ -361,10 +361,12 @@

-
- +
+
+ + +
-
@@ -393,7 +395,7 @@
-
+
@@ -423,7 +425,7 @@
-
+
@@ -452,7 +454,7 @@
-
+
@@ -478,7 +480,7 @@
-
+
@@ -511,7 +513,7 @@
-
+
@@ -528,7 +530,7 @@
-
+
diff --git a/public/styles/deferred-styles.css b/public/styles/deferred-styles.css index 97d483e..84e2180 100644 --- a/public/styles/deferred-styles.css +++ b/public/styles/deferred-styles.css @@ -388,6 +388,10 @@ x-dialog a { /* Pair Devices Dialog & Public Room Dialog */ +#public-room-dialog x-paper { + width: 450px; +} + .input-key-container { width: 100%; display: flex; @@ -544,18 +548,14 @@ x-dialog hr { } /* button row*/ -.btn-row > .btn { - height: 100%; - width: 100%; -} - -.btn-row > .btn { - margin-right: 5px; - margin-left: 5px; +.btn-row .btn { + margin: 3px; + flex-grow: 1; + height: 50px; + width: 120px; /* fixed width needed to ensure same width for all buttons */ } x-paper > .btn-row { - height: 50px; margin: 5px 10px 10px; } @@ -638,10 +638,11 @@ x-dialog .dialog-subheader { } .share-panel { + min-width: 250px; max-width: calc(100vw - 20px); overflow: hidden; - background-color: var(--primary-color); color: white; + background-color: var(--primary-color); background-image: linear-gradient(225deg, var(--accent-color) 0%, color-mix(in srgb, var(--accent-color) 60%, black) 100%); } @@ -677,6 +678,10 @@ x-dialog .dialog-subheader { background-position: center; } +.share-panel .btn { + height: 36px; +} + .share-descriptor { justify-content: center; } diff --git a/public/styles/styles-main.css b/public/styles/styles-main.css index 8f109c7..ae70041 100644 --- a/public/styles/styles-main.css +++ b/public/styles/styles-main.css @@ -48,16 +48,36 @@ html { } .m1 { - margin: 10px; + margin: 5px; } .cursive { font-style: italic; } -.row-reverse { +.wrap { display: flex; - flex-direction: row-reverse; + flex-wrap: wrap; +} + +.wrap-reverse { + display: flex; + flex-wrap: wrap-reverse; +} + +.grow { + display: flex; + flex-grow: 1; +} + +.grow-2 { + display: flex; + flex-grow: 2; +} + +.shrink { + display: flex; + flex-shrink: 1; } .flex { @@ -81,6 +101,11 @@ html { flex-direction: row; } +.row-reverse { + display: flex; + flex-direction: row-reverse; +} + .column { display: flex; flex-direction: column; @@ -92,10 +117,6 @@ html { justify-content: center; } -.grow { - flex-grow: 1; -} - .full { position: absolute; top: 0;