URL: <http://puszcza.gnu.org.ua/bugs/?623>
Summary: Images inverted with dark mode by default html5 css Project: tex4ht Submitted by: olifre Submitted on: Tue Apr 9 00:38:42 2024 Category: None Priority: 5 - Normal Severity: 3 - Minor Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: Dear Karl, feel free to close if this is intended — after updating from TeXlive 2021 to 2023, I noticed that with the default CSS and HTML5 mode in a dark-themed browser, all image colours are inverted. Body background colour and text colours are unaffected, but images are caught by the rule: \Css{ @media (prefers-color-scheme: dark) { img[src^="\jobname"]{filter: invert(1); } } } which was added in https://tug.org/svn/texlive/trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html5.tex?r1=64099&r2=65513 . The comment there mentions this is a fix for: "background of generated images in the dark mode" so I presume it was added on purpose. It seems quite irritating for a default — black graphics (e.g. pgfornaments) vanish against the white background when shown in a dark-themed browser, and photos get inverted colours. I'm personally using: filter: drop-shadow(7px 7px 4px rgba(0, 0, 0, .7)) invert(0) !important; in my CSS for all images to overwrite that. and of course "nostyle" might be what I should actually be using when using a custom CSS. As outlined, if the default is intended, feel free to close. Thanks! _______________________________________________________ Reply to this item at: <http://puszcza.gnu.org.ua/bugs/?623> _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/