Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown blockquotes does not render properly in dark mode #3048

Open
jhdcruz opened this issue Jun 20, 2023 · 2 comments
Open

Markdown blockquotes does not render properly in dark mode #3048

jhdcruz opened this issue Jun 20, 2023 · 2 comments
Labels
bug format: html An issue/PR related to Dokka's default HTML output format html: frontend An issue/PR that only or primarily requires frontend work (html/css)

Comments

@jhdcruz
Copy link

jhdcruz commented Jun 20, 2023

Describe the bug

Blockquotes does not render properly in dark mode when adding markdown using dokka-base plugin.

Expected behaviour

  • Switches/renders dark mode theme properly;
  • Readable blockquotes in dark mode.

Screenshots

Light mode Dark Mode
image image

To Reproduce

  1. Add dokka-base plugin to any project that uses dokka
  2. Add markdown with blockquotes using includes. (ex. README.md)
  3. Generate documentation

Dokka configuration
Configuration of dokka used to reproduce the bug

tasks {
    dokkaHtmlMultiModule {
        ...

        pluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
            includes.from(
                files(
                    "README.md"
                )
            )
            ...
        }
    }
}

Installation

  • Operating system: Not applicable
  • Build tool: Gradle v8.1.1
  • Dokka version: 1.8.20
@jhdcruz jhdcruz added the bug label Jun 20, 2023
@vmishenev vmishenev added the format: html An issue/PR related to Dokka's default HTML output format label Jun 22, 2023
@IgnatBeresnev
Copy link
Member

JFYI: it seems to have been partially fixed in #2836, and the fix will be released in the upcoming Dokka 1.9.0. Not sure how visible the left side panel should be though.

image

@solonovamax
Copy link

If you would like a 3rd party fix for this, consider trying out my dokka plugin, dokka style tweaks:

dependencies {
    dokkaPlugin("ca.solo-studios:dokka-style-tweaks-plugin:1.1.0")
}

it can then be configured using the type-safe plugin configuration:

 tasks {
     withType<AbstractDokkaTask>().configureEach {
         pluginConfiguration<DokkaStyleTweaksPlugin, DokkaStyleTweaksConfiguration> {
             minimalScrollbar = true
             darkPurpleHighlight = true
             improvedBlockquoteBorder = true
             lighterBlockquoteText = true
             sectionTabFontWeight = "500"
             sectionTabTransition = true
             improvedSectionTabBorder = true
             disableCodeWrapping = true
         }
     }
 }

or using json plugin configuration:

 tasks {
     withType<AbstractDokkaTask>().configureEach {
         val dokkaTweaksConfiguration = """
             {
                 "minimalScrollbar": true,
                 "darkPurpleHighlight": true,
                 "improvedBlockquoteBorder": true,
                 "lighterBlockquoteText": true,
                 "sectionTabFontWeight": "500"
                 "sectionTabTransition": true,
                 "improvedSectionTabBorder": true,
                 "disableCodeWrapping": true
             }
         """.trimIndent()
 
         pluginConfiguration.set(
                 mapOf(
                         "ca.solostudios.dokkastyles.plugin.DokkaStyleTweaksPlugin" to dokkaTweaksConfiguration,
                      )
                                )
     }
 }

all the tweaks are documented via kdoc, however you can find the source for it here

for this specific issue, the fix I applied can be used by setting lighterBlockquoteText to true. Also, if you don't like the weird blocky border for blockquotes, that can be changed for one that is (in my opinion) more appealing by setting improvedBlockquoteBorder to true, which instead uses a smaller purple-coloured bar, and is rounded on the corners.

note: by default, the plugin will apply no changes to the generated docs and will be identical to the docs without it. Everything is explicitly opt-in.

@IgnatBeresnev IgnatBeresnev added the html: frontend An issue/PR that only or primarily requires frontend work (html/css) label Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug format: html An issue/PR related to Dokka's default HTML output format html: frontend An issue/PR that only or primarily requires frontend work (html/css)
Projects
None yet
Development

No branches or pull requests

4 participants