about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOndřej Hruška <ondra@ondrovo.com>2017-07-11 17:53:50 +0200
committerOndřej Hruška <ondra@ondrovo.com>2017-07-11 17:53:50 +0200
commit08d19778d57f8e6f23e0b1531f98220a02c0d07a (patch)
treeea0ac2a46163971f1c4b39c51342a4a295eeeceb
parent9f7a5aac1e7e11bb433a040f468a53bc39fcb683 (diff)
Fix extra clickable spaces for narrow screen
-rw-r--r--app/javascript/styles/components.scss69
1 files changed, 64 insertions, 5 deletions
diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss
index a14929af9..49d3c9873 100644
--- a/app/javascript/styles/components.scss
+++ b/app/javascript/styles/components.scss
@@ -421,18 +421,77 @@
   cursor: pointer;
 }
 
-// Extra clickable area in the status gutter
-@media screen and (min-width: 1024px) {
+// --- Extra clickable area in the status gutter ---
+.ui.wide {
+  @mixin xtraspaces-full {
+    height: calc(100% + 10px);
+    bottom: -40px;
+  }
+  @mixin xtraspaces-short {
+    height: calc(100% - 35px);
+    bottom: 0;
+  }
+
+  // Avi must go on top if the toot is too short
+  .status__avatar {
+    z-index: 10;
+  }
+
+  // Base styles
   .status__content--with-action > div::after {
     content: '';
     display: block;
-    width: 68px;
-    height: calc(100% + 10px);
+    width: 64px;
     position: absolute;
     left: -68px;
-    bottom: -40px;
+
+    // more than 4 never fit on FullHD, short
+    @include xtraspaces-short;
   }
+
+  @media screen and (min-width: 1800px) {
+    // 4, very wide screen
+    .column:nth-child(2):nth-last-child(4) {
+      &, & ~ .column {
+        .status__content--with-action > div::after {
+          @include xtraspaces-full;
+        }
+      }
+    }
+  }
+
+  // 1 or 2, always fit
+  .column:nth-child(2):nth-last-child(1),
+  .column:nth-child(2):nth-last-child(2),
+  .column:nth-child(2):nth-last-child(3) {
+    &, & ~ .column {
+      .status__content--with-action > div::after {
+        @include xtraspaces-full;
+      }
+    }
+  }
+
+  @media screen and (max-width: 1440px) {
+    // 3, small screen
+    .column:nth-child(2):nth-last-child(3) {
+      &, & ~ .column {
+        .status__content--with-action > div::after {
+          @include xtraspaces-short;
+        }
+      }
+    }
+  }
+
+  // Phone or iPad
+  @media screen and (max-width: 1060px) {
+    .status__content--with-action > div::after {
+      display: none;
+    }
+  }
+
+  // I am very sorry
 }
+// --- end extra clickable spaces ---
 
 .status__content,
 .reply-indicator__content {