preview
This is a style I primarily made for myself, but why not share it. It’s inspired by some of the old subreddit styles and the old youtube design.
- Should work with litely and darkly plus compact variants.
- Uses rounded thumbnails to external links.
- Uses square thumbnails to internal images.
- Colored proprietary social media thumbs with their brand colors. (So you don’t accidentally click on a youtube link for example).
There still are some things I have to fix in the dark theme, like buttons and card headers for example.
This is a style I primarily made for myself, but why not share it. It’s inspired by some of the old subreddit styles and the old youtube design.
- Should work with litely and darkly plus compact variants.
- Uses rounded thumbnails to external links.
- Uses square thumbnails to internal images.
- Colored proprietary social media thumbs with their brand colors. (So you don’t accidentally click on a youtube link for example).
There still are some things I have to fix in the dark theme, like buttons and card headers for example.
preview
I’m currently using const prefersDarkTheme = window.matchMedia(‘(prefers-color-scheme: dark)’).matches; but it doesn’t take into consideration users that use a light system with a dark website.
EDIT: Solved with the following:
const element = document.getElementById("app");
const themeVariant = element.getAttribute("data-bs-theme");
if (themeVariant === "light") {
var primaryBackground = "#f0f0f0";
} else {
var primaryBackground = "#121317";
}
I’m currently using const prefersDarkTheme = window.matchMedia(‘(prefers-color-scheme: dark)’).matches; but it doesn’t take into consideration users that use a light system with a dark website.
EDIT: Solved with the following:
const element = document.getElementById("app");
const themeVariant = element.getAttribute("data-bs-theme");
if (themeVariant === "light") {
var primaryBackground = "#f0f0f0";
} else {
var primaryBackground = "#121317";
}