I had the same problem, and added the following code into conf/userscript.js file:
let style = document.createElement('style');
style.id = "custom-styles";
document.head.appendChild(style);
style.innerHTML = "@media only screen and (min-width: 1024px) { #dokuwiki__header .logo img { height: auto !important; } }";
I tried to add the CSS code into conf/userstyle.css instead but for some reason it wasn't being respected, even with the !important
CSS flag set. I believe it's somehow related to DokuWiki built-in CSS compressor, that appends user stylesheets before appending the CSS template file, but I'm not sure. But adding it through JS worked. The only drawback that it only will works with JS enabled browsers, but it's already a industry standard having JS enabled on web browsers, anyway, so you should not have issues using JS for this task. If anyone have a better approach to solve this issue, please share.