Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Quality Of Life Improvements for themes

  • #8453
    Avatar photo[anonymous]

    I have been using the documentation a lot, and it’s quite annoying changing the CSS all the time to make a black theme.
    <h1>Black Theme Support :idea:</h1>
    Please Add a simple Buttne in the configuration on the documentation theme
    that will change the text and background colors to a dark theme and add the option to change it to a dark theme.
    you can simply add a configuration theme a filed to change the color of the background and text
    I think that these options should be added to all the theams on publii because it will help people save time and not modify the CSS all the time.

    #8456
    Avatar photo[anonymous]

    After reading the development docs I simply added a background color picker to the sources theme.
    how ever, I think that a switch between them might be a better solution.
    anyways, these are the code snippets for the sources theme:
    file config.json
    lines 592 – 605

    {
        "name": "backgroundcolor",
        "label": "Background color",
        "group": "Colors",
        "value": "#000000",
        "type": "colorpicker"
    },
    {
        "name": "primaryColor",
        "label": "Primary color",
        "group": "Colors",
        "value": "#FF427F",
        "type": "colorpicker"
    },

    file theme-variables.js
    line 302

    --white:              ${params.backgroundcolor};

    while this is not a full solution. this solved my problem (having to update the CSS every single time).
    the log thream solution would be to add a switch between dark theme and white theme

    #8474
    Avatar photo[anonymous]

    @thefourCraft

    Perhaps something like this might work better, more efficiently as a plugin. Also, some commercial Publii themes already address the light / dark theme question.

    Moreover, depending on the theme, getting the colour mix right for both light and dark themes, while keeping the important accessibility quality issues addressed, can be tricky. Sometimes, I guess much depends on the default (presumably ‘light’ mode) theme colours.