Flickering (since v2.1.45)

I tried to upgrade from 2.1.44 to 48. Unfortunately after two unhappy days I had to downgrade again. When I do reviews in 2.1.48, there’s always a flicker before the front card is shown – an image (say) is first shown for a split-second in the upper left corner before being centred. This happens with all cards, and with every card and note type. I run macOS 11.6 and have 32 GB RAM, so it’s not a technical problem. My cards generally have some five fields and the content in those fields is not excessively long. It happens with or without addons. The flickering starts with 2.1.45 (I tried every version between 44 and 48). Is there anything I could do to speed up the loading time?

Cf. also White flickering between cards after updating past 2.1.41

Do you have a couple of cards that demonstrate the problem that can be publicly shared? If so, please export them to an .apkg and share them somewhere, so that we can try to reproduce the problem. If they are private, please send me a link in a private message instead.

I’ve found the culprit. Sorry that I didn’t think of it earlier. The first line of my Styling box is

@import url("_anki.css");

As soon as I remove the CSS file in question from collection.media, everything’s super smooth. Ditto, if I paste the entirety of my CSS file into the Styling box.

Another possibility would be to start one’s templates with

<link rel="stylesheet" type="text/css" href="_anki.css" />

Regrettably the unhealthy flickering re-occurs – even if the CSS file numbers only a few lines.

It’s really strange. I never had any problem with linking to an external CSS file up to and including 2.1.44. I know that this was never officially supported, but let me ask you nonetheless – do you think there’s a chance that linking to an external CSS will again work in the future? or should I just go ahead and copy everything into the Styling box of my 30 note types?

Is there some other way to determine the look of my cards in a central way?

1 Like

By the way, on AnkiMobile (latest version), there’s no flickering at all when one uses something like

@import url("_anki.css");

1 Like

Thanks for narrowing it done, I’ve made a note of it on flickering when external css reference used · Issue #1455 · ankitects/anki · GitHub

1 Like

Hi, I have the same problem since V2.1.45.
I use “@import url …” for the styling of my cards too.
Hope there will be a fix. Let me know if I can help by giving further informarion.

1 Like

Hi, I testet the new beta 2.1.50 on Intel Macbook Pro (11.3.1 (20E241). And I tested 2.1.49. (The last “working” version ist 2.1.44.)
With @import url("_anki.css"); in the Styling field the flickering still appears. When I copy my complete *.css code to the Styling field of the Cards everything is fine. The problem is already marked “solved” in GitHub. So whats the trick to solve the problem :slight_smile: ? I would love to have the .css separately for future edeting of my styling ?

The last beta is from December 9 and the fix was merged on December 14. So there is currently no packaged build containing the fix.

2 Likes

Thank you

Btw, if you want to import external CSS you could try the add-on Asset Manager, which roughly enables you to manager external assets (you’d never have guessed), such as CSS, JS or HTML templates.

1 Like