FIX: Correct the play icon position (#14295)

FIX: Correct the play icon position (#14295)

diff --git a/app/assets/stylesheets/common/base/onebox.scss b/app/assets/stylesheets/common/base/onebox.scss
index 72e2939..368c7cf 100644
--- a/app/assets/stylesheets/common/base/onebox.scss
+++ b/app/assets/stylesheets/common/base/onebox.scss
@@ -290,7 +290,12 @@ aside.onebox {
       }
     }
 
-    .instagram-video-icon {
+    .image-wrapper {
+      display: block;
+      position: relative;
+    }
+
+    .video-icon {
       &:before {
         opacity: 0.8;
         // ideally, the SVG used here should be in HTML and reference the SVG sprite
diff --git a/lib/onebox/engine/google_photos_onebox.rb b/lib/onebox/engine/google_photos_onebox.rb
index 3a07b7d..6c930ce 100644
--- a/lib/onebox/engine/google_photos_onebox.rb
+++ b/lib/onebox/engine/google_photos_onebox.rb
@@ -31,9 +31,9 @@ module Onebox
             <article class="onebox-body">
               <h3><a href="#{escaped_url}" target="_blank" rel="nofollow ugc noopener">#{og.title}</a></h3>
               <div class="aspect-image-full-size">
-                <a href="#{escaped_url}" target="_blank" rel="nofollow ugc noopener">
+                <a href="#{escaped_url}" target="_blank" rel="nofollow ugc noopener" class="image-wrapper">
                   <img src="#{og.secure_image_url}" class="scale-image"/>
-                  <span class="instagram-video-icon"></span>
+                  <span class="video-icon"></span>
                 </a>
               </div>
             </article>
diff --git a/lib/onebox/engine/reddit_media_onebox.rb b/lib/onebox/engine/reddit_media_onebox.rb
index c9d6cdc..d479a6b 100644
--- a/lib/onebox/engine/reddit_media_onebox.rb
+++ b/lib/onebox/engine/reddit_media_onebox.rb
@@ -25,7 +25,7 @@ module Onebox
               </article>
             </aside>
           HTML
-        elsif  raw[:type] =~ /^video[\/\.]/
+        elsif raw[:type] =~ /^video[\/\.]/
           <<-HTML
             <aside class="onebox reddit">
               <header class="source">
@@ -35,9 +35,9 @@ module Onebox
               <article class="onebox-body">
                 <h3><a href="#{raw[:url]}" target="_blank" rel="nofollow ugc noopener">#{raw[:title]}</a></h3>
                 <div class="aspect-image-full-size">
-                  <a href="#{raw[:url]}" target="_blank" rel="nofollow ugc noopener">
+                  <a href="#{raw[:url]}" target="_blank" rel="nofollow ugc noopener" class="image-wrapper">
                     <img src="#{raw[:image]}" class="scale-image"/>
-                    <span class="instagram-video-icon"></span>
+                    <span class="video-icon"></span>
                   </a>
                 </div>
                 <div class="description"><p>#{raw[:description]}</p></div>

GitHub sha: 02a6b991fec610aaf0992b0e4e03a1147644b765

This commit appears in #14295 which was approved by pmusaraj. It was merged by CvX.