Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add our own custom styling #70

Open
4 tasks
cjrace opened this issue Aug 15, 2024 · 2 comments · May be fixed by #128
Open
4 tasks

Add our own custom styling #70

cjrace opened this issue Aug 15, 2024 · 2 comments · May be fixed by #128
Assignees
Labels
enhancement New feature or request

Comments

@cjrace
Copy link
Contributor

cjrace commented Aug 15, 2024

Is your feature request related to a problem? Please describe.
We should start a custom CSS file or something like that so we can more ees-ily customise the styling of the site.

Describe the solution you'd like
Ideal is probably two CSS files - one with the light theme and one with the dark theme, or maybe a third that has any global settings we want in both to save duplication.

Describe alternatives you've considered
Not thought this through a lot yet, though I'm assuming there's a way to do this to allow us to customise the styling more.

Additional context
Current known issues we want to address when we can customise more:

  • Breadcrumb links aren't visible on the 'light' theme (aren't great on the dark either!)

Dark
image

Light
image

  • Line breaks only appear automatically under h2's, but ideally we'd want to set defaults for all headers to have them above and below, as having them set manually around this in the .qmd files is chaos

  • Link text colours aren't always of a high enough contrast, e.g.
    image

  • Code block and snippet colours (backgrounds and font colours) are not part of the current bootstrap themes we use and are instead set to be the Quarto default colours:

image

This means they look out of place with the rest of the theme, especially in dark mode. It'd be nice to set these as custom values that are more cohesive with whatever we choose for the new themes. You can find more info on modifying the CSS values for Quarto code blocks here: https://quarto.org/docs/output-formats/html-code.html

@cjrace cjrace added the enhancement New feature or request label Aug 15, 2024
@jen-machin
Copy link
Contributor

jen-machin commented Aug 16, 2024

To note on the themes: they're currently defined in the .yml in reverse (the light theme is set as a dark theme to enforce dark mode as default). Can we get around having to do this? Is there a mechanism to set the dark theme as default so we can put the themes in the correct places? I think this might be what's causing the font colour issues. When the light theme is set to an actual light theme, the breadcrumb links look correct:

image

The current contrast remains a problem for dark mode though, so it's not as easy as just switching the two around and some modifications will be required.

Current themes being used are bootswatch ones:
https://bootswatch.com/cyborg/ (dark theme set as light)
https://bootswatch.com/united/ (light theme set as dark)

Something else to note is that the two themes have different fonts - it'd be nice to get some consistency across the two, ideally Roboto for accessibility purposes although I'm not sure how easy that'd be.

You can customise Bootswatch themees using this site to get them looking how you'd like and then download the CSS: https://bootstrap.build/app

@jen-machin
Copy link
Contributor

@mzayeddfe mzayeddfe self-assigned this Dec 3, 2024
@mzayeddfe mzayeddfe linked a pull request Dec 9, 2024 that will close this issue
@mzayeddfe mzayeddfe linked a pull request Dec 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants