- check if it is possible to auto update the styling when user change the wordpress theme
Description
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T327100 Improve Experience for Site Owners & Readers using Wikipedia Preview Plugin | |||
Resolved | SBisson | T345167 [Spike] Wordpress plugin styling based on theme |
Event Timeline
Comment Actions
What I've tried
There are variables for colors and other visual aspect of the current site and we can use and apply to the Wikipedia Preview popup to try to make it blend better with the host site.
Some WordPress variables |
Example of popup using the theme's background and text colors |
I've made a draft PR that shows the approach.
Issues
The main issue I found is the inability to change the watermark color (svg files hosted on Commons and hardcoded to be black on a transparent background). As soon as the background becomes dark the "Wikipedia" in the header becomes less visible.
Skins can also redefine visual aspects of the site without assigning variables so there is no guarantee that our popup would be in sync with the theme.
Other options
- Offer an explicit dark mode (with appropriate wordmark images) that can detect the dark mode on wordpress or be turned on/off explicitly.
- Offer a basic Wikipedia Preview visual customization page on Wordpress admin that allows choosing main colors and fonts to make it fit in the host site.
- Offer detailed instructions for admin users willing to customize the preview popup with css. This is similar to what we have done for the preview word customization but it needs to be much more detailed for the whole preview.