# Box shadow issue

**URL:** <https://forums.ankiweb.net/t/box-shadow-issue/31475>\
**Category:** Help\
**Created:** [June 22, 2023, 7:35pm UTC](https://forums.ankiweb.net/t/box-shadow-issue/31475 "2023-06-22T19:35:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sornay](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sornay](https://forums.ankiweb.net/u/sornay)\
**Post date:** [June 22, 2023, 7:35pm UTC](https://forums.ankiweb.net/t/box-shadow-issue/31475/1 "2023-06-22T19:35:45Z")

</div>

Hi, I’ve just updated my Anki to anki- **2.1.65** -windows-qt5, and I’ve noticed that box shadow that I’ve applied in styling doesn’t work anymore.  
Here are two screenshots from my previous version and the new version:

 ![Style 3 preview](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/2X/1/1baaf7b1eaf7614e22caea2f507c184c437f58ef.jpeg)

 ![Screenshot 2023-06-22 230217](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/2X/b/b98ca8d6b05d227a55cfc87ac14bb2cc2f2df869.jpeg)

---

<div class="post-metadata">

**Author:** ![jcznk](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/jcznk/32/15215_2.png) [@jcznk](https://forums.ankiweb.net/u/jcznk)\
**Post date:** [June 22, 2023, 7:51pm UTC](https://forums.ankiweb.net/t/box-shadow-issue/31475/2 "2023-06-22T19:51:19Z")

</div>

Hi! By any chance, are you using Anki with Minimalist mode enabled?

---

<div class="post-metadata">

**Author:** ![sornay](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sornay](https://forums.ankiweb.net/u/sornay)\
**Post date:** [June 22, 2023, 8:03pm UTC](https://forums.ankiweb.net/t/box-shadow-issue/31475/3 "2023-06-22T20:03:32Z")

</div>

Oh. Actually yes. That was the first thing I did after the update. Because suddenly everything looked bigger to me. And that seems to be the problem. Thanks.

---

<div class="post-metadata">

**Author:** ![jcznk](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/jcznk/32/15215_2.png) [@jcznk](https://forums.ankiweb.net/u/jcznk)\
**Post date:** [June 22, 2023, 8:18pm UTC](https://forums.ankiweb.net/t/box-shadow-issue/31475/4 "2023-06-22T20:18:15Z")

</div>

I see! If you want, by adjusting your CSS, you should be able to have a box-shadow even with Minimalist mode enabled.

The reason why box-shadow doesn’t work is that Anki currently uses this code:

```auto
body:not(.fancy), body:not(.fancy) * {
    box-shadow: none !important;
    backdrop-filter: none !important;
}

```

Where :not(.fancy) corresponds to Minimalist mode.

By increasing the specificity of your own selector (by prepending `body`) and using !important, you should be able to override the default styling.

For example, this kind of code seems to work fine on my computer:

```auto
body .myClass {
  box-shadow: ... !important;
}

```

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [June 23, 2023, 10:51am UTC](https://forums.ankiweb.net/t/box-shadow-issue/31475/5 "2023-06-23T10:51:12Z")

</div>

I’ve logged this on [Consider making reduce-motion and minimalist modes opt-in instead of opt-out · Issue #2557 · ankitects/anki · GitHub](https://github.com/ankitects/anki/issues/2557)

---

<div class="post-metadata">

**Author:** ![tatsumoto](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/tatsumoto/32/5411_2.png) [@tatsumoto](https://forums.ankiweb.net/u/tatsumoto)\
**Post date:** [July 2, 2023, 1:48am UTC](https://forums.ankiweb.net/t/box-shadow-issue/31475/6 "2023-07-02T01:48:11Z")

</div>

Tried adding box-shadows to my cards today. Can confirm that it doesn’t work. However, the shadows are visible in the Browser window when editing field contents.

upd: Thanks for the fix!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [August 1, 2023, 1:49am UTC](https://forums.ankiweb.net/t/box-shadow-issue/31475/7 "2023-08-01T01:49:02Z")

</div>

Closed on August 1, 2023, 1:49am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
