Skip to content

[ENHANCEMENT] Show library documentation with a light or dark theme depending on the active color theme #88

Closed

Description

@mardukbp

Is your enhancement request related to a problem? Please describe.
Currently, the library documentation is shown as black text on a white background regardless of the active color theme. With a dark color theme the contrast between the code and the documentation is unpleasant.

Describe the solution you'd like
If a dark (light) theme is selected the documentation should be shown with a dark (light) theme.

Describe alternatives you've considered
I opened an issue in the RF repo to add a stylesheet parameter to libdoc to be able to specify the stylesheet used when generating the documentation in HTML format.

Additional context

The RF LS extension already offers this functionality:

grafik

Activity

  1. added
    enhancement
    on Oct 6, 2022
  2. d-biehl commented on Oct 6, 2022

    @d-biehl
    Member

    The theme of the documentation is sadly dependent on the OS theme, if you switch the windows color theme to dark mode, you will get a dark documentation and otherwise.

    This is handled in the CSS of the library, which I can't change at the moment.
    But I'm working on it.

  3. self-assigned this
    on Oct 6, 2022
  4. mardukbp commented on Oct 7, 2022

    @mardukbp
    ContributorAuthor

    Yeah, you are right. I checked the code of the LS extension. They just replace "prefers-color-scheme: dark" based on vscode.window.activeColorTheme.kind. It is a quick way to achieve the desired result, but I think that supporting both the OS-level and the VS Code-level color theme settings in the CSS would provide more flexibility. Here are some implementations that one could consider.

  5. d-biehl commented on Oct 9, 2022

    @d-biehl
    Member

    Waiting for implemention of robotframework/robotframework#4497

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions