From 7fc99f5e7b4fb4b60c778c5458e32853e00e8063 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 28 Nov 2019 10:51:08 +0100 Subject: [PATCH] UX: do not show shadow on hover images on touch devices (#8429) --- .../stylesheets/common/base/lightbox.scss | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/app/assets/stylesheets/common/base/lightbox.scss b/app/assets/stylesheets/common/base/lightbox.scss index 465d2c49b20..b15a724b2a6 100644 --- a/app/assets/stylesheets/common/base/lightbox.scss +++ b/app/assets/stylesheets/common/base/lightbox.scss @@ -73,15 +73,17 @@ $meta-element-margin: 6px; margin: auto; } -@if is-light-color-scheme() { - a.lightbox { - -webkit-transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); - transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); - } +.discourse-no-touch { + @if is-light-color-scheme() { + a.lightbox { + -webkit-transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); + transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); + } - a.lightbox:hover { - border-radius: 5px; - box-shadow: 0 2px 5px 0 rgba($primary, 0.2), - 0 2px 10px 0 rgba($primary, 0.2); + a.lightbox:hover { + border-radius: 5px; + box-shadow: 0 2px 5px 0 rgba($primary, 0.2), + 0 2px 10px 0 rgba($primary, 0.2); + } } }