Global CSS

bkhl's Avatar

bkhl

17 Sep, 2016 04:23 AM

Hello,

is there some way in Anki to make a global CSS to apply to all your note types? I have six types, using the same CSS for all of them, but having to copy/paste the sheet between decks is a bit inconvenient.

  1. 1 Posted by Glutanimate on 17 Sep, 2016 07:22 AM

    Glutanimate's Avatar

    There's no user-defined global CSS as far as I know, but you could use an external CSS file to manage all decks. To do this you just have to paste your CSS into a file in your Anki media directory, name it with a leading underscore so that it doesn't get deleted, and then import it on all relevant templates via the following line in your style fields:

    @import url("_stylesheet.css");
    
  2. 2 Posted by Soren Bjornstad on 17 Sep, 2016 01:32 PM

    Soren Bjornstad's Avatar

    Hi bkhl,

    This is not currently possible, but it's something we're considering for future versions.

  3. 3 Posted by bkhl on 24 Sep, 2016 07:20 AM

    bkhl's Avatar

    I'm now using Glutanimate's solution, which is convenient enough for my six decks, and works when syncing to AnkiDroid too.

  4. 4 Posted by Soren Bjornstad on 25 Sep, 2016 02:10 PM

    Soren Bjornstad's Avatar

    Thanks Glutanimate!

  5. Soren Bjornstad closed this discussion on 25 Sep, 2016 02:10 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac