Custom Theme help please.

8 views
Skip to first unread message

Mike Proudman

unread,
Dec 12, 2025, 10:24:06 AM12/12/25
to Numbas Users
Hi All,
Could anyone point me in the right direction to change the font colour for the left side question list/menu please. As in which file to edit.

Mike P

Christian Lawson-Perfect

unread,
Dec 18, 2025, 8:55:50 AM12/18/25
to numbas...@googlegroups.com
In the default theme, links inside <nav> elements are set to use the standard text colour. The relevant lines are at https://github.com/numbas/Numbas/blob/master/themes/default/files/resources/color-mix.css#L419 and https://github.com/numbas/Numbas/blob/master/themes/default/files/resources/exam.css#L279.

If you override this, please think carefully about how it will work with the different colour schemes, and still allow the student to choose their own colour.

If you wanted to make the text red, for example, you could try this CSS, with a darker red in the light colour scheme and a lighter red in the dark colour scheme:

@layer theme {
    .numbas-container[data-prefers-color-scheme="light"] #sideNav {
        color: #cc0000;
    }
    .numbas-container[data-prefers-color-scheme="dark"] #sideNav {
        color: #ff9999;
    }
}



--
You received this message because you are subscribed to the Google Groups "Numbas Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numbas-users...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/numbas-users/598a203f-e371-4e80-90a5-2bdc78cb2746n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages