about summary refs log tree commit diff
path: root/app/javascript/styles
diff options
context:
space:
mode:
authorMashiro <moezhx@outlook.com>2020-11-03 04:16:38 +0800
committerGitHub <noreply@github.com>2020-11-02 21:16:38 +0100
commit6a2db10f767879b9072b6c020ebadac4f985ed34 (patch)
tree2d126048ac0a7ff8d95db4b6b9beaefee947acef /app/javascript/styles
parent4b2ec4a2dc3348ff27f74f442e408d92075bf7c2 (diff)
Add expand/compress image button on image view box (#15068)
* add zoom image button

* enhance zoom algorithm & add translation

* code structure

* code structure

* code structure

* enhance grab performance

* rm useless state

* fix behavior on Firefox & scroll lock & horizontal scroll with mousewheel

* remove scroll lock on MouseWheelEvent

* code structure

* enhance algorithm and code structure

* rm Gemfile.lock from tree

* codeclimate

* fix a stupid mistake
Diffstat (limited to 'app/javascript/styles')
-rw-r--r--app/javascript/styles/mastodon/components.scss29
1 files changed, 29 insertions, 0 deletions
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss
index deec5c68a..9cbd7505c 100644
--- a/app/javascript/styles/mastodon/components.scss
+++ b/app/javascript/styles/mastodon/components.scss
@@ -1720,6 +1720,20 @@ a.account__display-name {
   align-items: center;
   justify-content: center;
   flex-direction: column;
+  scrollbar-width: none; /* Firefox */
+  -ms-overflow-style: none;  /* IE 10+ */
+
+  * {
+    scrollbar-width: none; /* Firefox */
+    -ms-overflow-style: none;  /* IE 10+ */
+  }
+
+  &::-webkit-scrollbar,
+  *::-webkit-scrollbar {
+    width: 0;
+    height: 0;
+    background: transparent; /* Chrome/Safari/Webkit */
+  }
 
   .image-loader__preview-canvas {
     max-width: $media-modal-media-max-width;
@@ -4606,6 +4620,21 @@ a.status-card.compact:hover {
   z-index: 100;
 }
 
+.media-modal__zoom-button {
+  position: absolute;
+  right: 64px;
+  top: 8px;
+  z-index: 100;
+  pointer-events: auto;
+  transition: opacity 0.3s linear;
+  will-change: opacity;
+}
+
+.media-modal__zoom-button--hidden {
+  pointer-events: none;
+  opacity: 0;
+}
+
 .onboarding-modal,
 .error-modal,
 .embed-modal {