Nothing Special   »   [go: up one dir, main page]

Page MenuHomePhabricator

Specify alternative image for use in dark mode.
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):

Specify alternative image for use in dark mode.

Something like...

[[file:example.jpg|thumb|right|dmalt=exampledark.jpg]]

...would show the alternative image in dark mode.

Benefits (why should this be implemented?):

Would enable alternatives to on-white images with on-black images to match the black background.

Event Timeline

Is there a specific use case example, please?

Jdlrobson subscribed.

This can currently be done with creative use of templates. IMO it shouldn't be done in the main software as generally it's a bad idea to serve different content to different users.

I am guessing that the desire here is to have SVGs that render in different themes for which T5593 would be the preferred solution here.

IMO it shouldn't be done in the main software as generally it's a bad idea to serve different content to different users.

The source element would be appropriate here, which supports media queries. Not sure how it could be used for selection of a specific color theme (vice the automatic -os), but I guess you could output 3 images and hide selectively with CSS. It wouldn't require varying the cache.