Bibliogram themes

I did it. After a few hours of intense coding, Bibliogram themes are here.

I've only just finished this, so we only have classic and classic blue, but someone has an open pull request for a dark theme so I hope we can add that soon. I'm trying to encourage as many people as possible to create themes that we can get into the main repo, because themes are good!

Yeah, this is a callout post for you. Want to make a theme? It's actually really easy. You can dive right in and start changing stuff or join the chatroom to ask for help. See also the / three / diagrams that show what values do what.

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 on the Bibliogram repo 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.

— Cadence

← Previous: Sass themesNext: Bibliogram themes II →