When importing a deck and selecting to update and merge note types, shared static filesare not updated,e.g. _shared_blk.css

There are 6 note types in one of my decks, and all 6 note types reference the same common style file, like this:

@import url(_shared_blk.css);

.type-input {
  margin: 1.5rem auto;
}
...

When exporting and packaging the deck, _shared_blk.css is packaged into the apkg file without any issues.
However, when I later modify the style code (including the code in _shared_blk.css) and try to update the deck templates on another device via manual import, I check the following options during the import process:

Merge note types √

Update notes Always

Update note types Always

The styles within the note types themselves are indeed updated, but the code in _shared_blk.css is not.

Expected behavior, Add an option during deck import and update:

Update static files

Alternatively, shared static files should be updated by default when the Update note types option is checked.

I know that renaming this shared file will enable a successful update, but I really don’t want to have to rename this static file every single time. Therefore, I still hope the official team can provide this overwrite option, with the risk borne by the user themselves. If a user insists on using a very common static file name (e.g., _shared.css or _global.css), it means they are willing to take the risk of being overwritten unexpectedly by other decks. As for me, I will definitely add an identity identifier such as a GUID to my public static files.

For reference: When importing a deck and selecting to update and merge note types, shared static filesare not updated,e.g. _shared_blk.css · Issue #4491 · ankitects/anki · GitHub

2 Likes