Skip to content

A platform for community discussion. Free, open, simple.

UX: do not show shadow on hover images on touch devices (#8429)

Joffrey JAFFEUX7fc99f5e7b4f
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);
+ }
}
}