Jenkins inline styling for artefacts is disabled by default for security reasons. The following guide shows how to re-0enable this.
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' 'unsafe-inline' data:;")