Sign in

Quality Of Life Improvements for themes

  • This topic has 2 replies, 2 voices, and was last updated 2 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8453
    Avatar photothefourCraft

    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 photothefourCraft

    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

    Attachments:
    #8474
    Avatar photoitips3727

    @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.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.