improve likes-dislikes bar usability
authorRigel Kent <sendmemail@rigelk.eu>
Sun, 15 Dec 2019 23:13:31 +0000 (00:13 +0100)
committerRigel Kent <sendmemail@rigelk.eu>
Sun, 15 Dec 2019 23:13:31 +0000 (00:13 +0100)
client/src/app/videos/+video-watch/video-watch.component.html
client/src/app/videos/+video-watch/video-watch.component.scss

index 9e653ea782f1b99da471b56e98e1b34526d47a9d..b3def01faa36afb2000ff2090289e79bcaac976c 100644 (file)
                   ></my-video-actions-dropdown>
                 </div>
 
-                <div
-                  class="video-info-likes-dislikes-bar"
-                  *ngIf="video.likes !== 0 || video.dislikes !== 0"
-                  [ngbTooltip]="likesBarTooltipText"
-                  placement="bottom"
-                >
-                  <div class="likes-bar" [ngStyle]="{ 'width.%': video.likesPercent }"></div>
+                <div class="video-info-likes-dislikes-bar-outerContainer">
+                  <div
+                    class="video-info-likes-dislikes-bar-innerContainer"
+                    *ngIf="video.likes !== 0 || video.dislikes !== 0"
+                    [ngbTooltip]="likesBarTooltipText"
+                    placement="bottom"
+                  >
+                    <div
+                      class="video-info-likes-dislikes-bar"
+                    >
+                      <div class="likes-bar" [ngStyle]="{ 'width.%': video.likesPercent }"></div>
+                    </div>
+                  </div>
                 </div>
               </div>
 
index 15335b0b3696ee463f7d0921f94d84e797c60cf3..a8400c1962eaa6382e0993c2c992ce35821e10f9 100644 (file)
@@ -209,6 +209,7 @@ $video-info-margin-left: 44px;
       .video-actions-rates {
         margin: 0 0 10px 0;
         align-items: start;
+        align-self: end;
         width: max-content;
 
         .video-actions {
@@ -295,6 +296,15 @@ $video-info-margin-left: 44px;
           }
         }
 
+        .video-info-likes-dislikes-bar-outerContainer {
+          position: relative;
+        }
+
+        .video-info-likes-dislikes-bar-innerContainer {
+          position: absolute;
+          height: 30px;
+        }
+
         .video-info-likes-dislikes-bar {
           $likes-bar-height: 2px;
           height: $likes-bar-height;