summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/common/client.js10
-rw-r--r--public/common/columbia.css12
2 files changed, 17 insertions, 5 deletions
diff --git a/public/common/client.js b/public/common/client.js
index 2b34487..8e6c27d 100644
--- a/public/common/client.js
+++ b/public/common/client.js
@@ -42,9 +42,13 @@ function scroll_into_view(e) {
e.scrollIntoView({ block: "center", inline: "center", behavior: "smooth" })
}
-function scroll_into_view_if_mobile(e) {
- if (window.innerWidth <= 800)
- scroll_into_view(e)
+function scroll_into_view_if_needed(e) {
+ if (window.innerWidth <= 800) {
+ // TODO: close log on mobile?
+ e.scrollIntoView({ block: "start", inline: "center", behavior: "smooth" })
+ } else {
+ e.scrollIntoView({ block: "nearest", inline: "nearest", behavior: "smooth" })
+ }
}
function scroll_with_middle_mouse(panel_sel, multiplier) {
diff --git a/public/common/columbia.css b/public/common/columbia.css
index 2c20d45..209918d 100644
--- a/public/common/columbia.css
+++ b/public/common/columbia.css
@@ -1,13 +1,21 @@
/* BATTLE DIALOG FOR COLUMBIA BLOCK GAMES */
#battle {
+ display: none;
position: absolute;
- min-width: 524px; /* 6 blocks wide */
+ scroll-margin: 20px;
z-index: 50;
box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.5);
background-color: white;
border: 1px solid black;
- display: none;
+ min-width: 524px; /* 6 blocks wide */
+}
+
+@media (max-width: 400px) {
+ #battle {
+ min-width: 100vw;
+ min-width: 100dvw;
+ }
}
#battle .block {