Skip to content

Add grayscale filter option #10

@thewildmage

Description

@thewildmage

This would involve creating a new control set "Filter" with the options "None" or "Grayscale."

Should be fully compatible with all theme options.

The theme-control.js module will need to be refactored to handle multiple sets of controls.

Most of the CSS work can be done with just:

body[data-filter="grayscale"] {
    filter: grayscale(100%);
}

There's an issue there with the <body> background-color though, which is still shown in color after applying the filter. Sounds like this might actually be the <body> propagating the color to <html> (https://stackoverflow.com/questions/61246462/css-filterinvert-not-working-with-background-color). Will need to dig into this further.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions