diff --git a/gradle-license-plugin/src/main/kotlin/com/jaredsburrows/license/internal/report/HtmlReport.kt b/gradle-license-plugin/src/main/kotlin/com/jaredsburrows/license/internal/report/HtmlReport.kt index 99c04463..37511887 100644 --- a/gradle-license-plugin/src/main/kotlin/com/jaredsburrows/license/internal/report/HtmlReport.kt +++ b/gradle-license-plugin/src/main/kotlin/com/jaredsburrows/license/internal/report/HtmlReport.kt @@ -225,9 +225,17 @@ class HtmlReport(private val projects: List) : Report { const val DOCTYPE = "" const val META = "" const val CSS_STYLE = - "body { font-family: sans-serif } " + + // Default light theme styles + "body { font-family: sans-serif; background-color: #ffffff; color: #000000; } " + + "a { color: #0000EE; } " + "pre { background-color: #eeeeee; padding: 1em; white-space: pre-wrap; " + - "word-break: break-word; display: inline-block }" + "word-break: break-word; display: inline-block; } " + + + // Dark theme styles + "@media (prefers-color-scheme: dark) { " + + "body { background-color: #121212; color: #E0E0E0; } " + + "a { color: #BB86FC; } " + + "pre { background-color: #333333; color: #E0E0E0; } }" const val OPEN_SOURCE_LIBRARIES = "Open source licenses" const val NO_LIBRARIES = "None" const val NO_LICENSE = "No license found" diff --git a/gradle-license-plugin/src/test/groovy/com/jaredsburrows/license/LicensePluginAndroidSpec.groovy b/gradle-license-plugin/src/test/groovy/com/jaredsburrows/license/LicensePluginAndroidSpec.groovy index 1392f86b..8d92f46d 100644 --- a/gradle-license-plugin/src/test/groovy/com/jaredsburrows/license/LicensePluginAndroidSpec.groovy +++ b/gradle-license-plugin/src/test/groovy/com/jaredsburrows/license/LicensePluginAndroidSpec.groovy @@ -77,7 +77,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses @@ -157,7 +157,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses @@ -369,7 +369,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses @@ -519,7 +519,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses @@ -748,7 +748,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses @@ -894,7 +894,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses @@ -1011,7 +1011,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses @@ -1166,7 +1166,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses @@ -1667,7 +1667,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses @@ -1769,7 +1769,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses @@ -1863,7 +1863,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses @@ -1929,7 +1929,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses @@ -2023,7 +2023,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses @@ -2090,7 +2090,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses @@ -2186,7 +2186,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses @@ -2280,7 +2280,7 @@ final class LicensePluginAndroidSpec extends Specification { - + Open source licenses diff --git a/gradle-license-plugin/src/test/groovy/com/jaredsburrows/license/LicensePluginJavaSpec.groovy b/gradle-license-plugin/src/test/groovy/com/jaredsburrows/license/LicensePluginJavaSpec.groovy index f5fddb61..5f003638 100644 --- a/gradle-license-plugin/src/test/groovy/com/jaredsburrows/license/LicensePluginJavaSpec.groovy +++ b/gradle-license-plugin/src/test/groovy/com/jaredsburrows/license/LicensePluginJavaSpec.groovy @@ -45,7 +45,7 @@ final class LicensePluginJavaSpec extends Specification { - + Open source licenses @@ -104,7 +104,7 @@ final class LicensePluginJavaSpec extends Specification { - + Open source licenses @@ -188,7 +188,7 @@ final class LicensePluginJavaSpec extends Specification { - + Open source licenses @@ -298,7 +298,7 @@ final class LicensePluginJavaSpec extends Specification { - + Open source licenses @@ -357,7 +357,7 @@ final class LicensePluginJavaSpec extends Specification { - + Open source licenses @@ -449,7 +449,7 @@ final class LicensePluginJavaSpec extends Specification { - + Open source licenses @@ -550,7 +550,7 @@ final class LicensePluginJavaSpec extends Specification { - + Open source licenses @@ -671,7 +671,7 @@ final class LicensePluginJavaSpec extends Specification { - + Open source licenses @@ -812,7 +812,7 @@ final class LicensePluginJavaSpec extends Specification { - + Open source licenses @@ -998,7 +998,7 @@ final class LicensePluginJavaSpec extends Specification { - + Open source licenses @@ -1123,7 +1123,7 @@ final class LicensePluginJavaSpec extends Specification { - + Open source licenses diff --git a/gradle-license-plugin/src/test/groovy/com/jaredsburrows/license/internal/report/HtmlReportSpec.groovy b/gradle-license-plugin/src/test/groovy/com/jaredsburrows/license/internal/report/HtmlReportSpec.groovy index 0088be0a..ecc7eb3f 100644 --- a/gradle-license-plugin/src/test/groovy/com/jaredsburrows/license/internal/report/HtmlReportSpec.groovy +++ b/gradle-license-plugin/src/test/groovy/com/jaredsburrows/license/internal/report/HtmlReportSpec.groovy @@ -21,7 +21,7 @@ final class HtmlReportSpec extends Specification { - + Open source licenses @@ -75,7 +75,7 @@ final class HtmlReportSpec extends Specification { - + Open source licenses