Themes are here.
How did I overcome yesterday's problems? I realised that a giant mixin wasn't the way to go. Instead, I used Sass's
@use with. This allows you to import another file and overwrite some variables in it. So I set up the main file to have the main code, which accesses themes from a
$theme variable, and then each theme file imports main and overwrites that variable with its own style. It ended up being the same idea as what I wanted to do yesterday except SUPER elegant and works really well! Since each theme is also a Sass file, it can of course add whatever custom stylesheet modifications it wants to, so if for some reason you don't want links to be underlined in a certain theme, then that's free and easy to do. You can see my code online if you want to know the gritty details.
How did I get around multiline maps? The answer is that multiline anything isn't supported in the indented syntax, which is incredibly sad. I've had to use .scss files to store the actual colour map, but I've left everything else in .sass because indented syntax best syntax.
I also got out of bed relatively early, went for a walk in the beautiful day, made some more progress on the group assignment and handed in tutorial work for one class. I even managed to stop working in time to not have to write this post in the dead of morning. Very good day. Tomorrow I need to write tests for the group assignment. I feel like I'm drowning less but I do have quite a bit of work left to do.
Very, very good day. I rate 10/10.