swagger-api / swagger-api/swagger-codegen

[html2] generated api documentation section headers are white on white on mouseover

Open
#9,454 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

The html2 documentation generated by codegen creates navigation section headers ("API SUMMARY", "API METHODS - DEFAULT", etc) which, on mouseover, become white text on a white background.

Swagger-codegen version

3.0.8

Swagger declaration file content or url

N/A - using api.swaggerhub.com

Command line used for generation

N/A - using api.swaggerhub.com

Steps to reproduce
  1. Create a valid OAS API in SwaggerHub online
  2. Download autogenerated documentation by clicking Export > Documentation > html2
  3. Open the resulting index.html file in a browser
  4. Note the navigation section headers in the upper left (white text on blue background)
  5. Hover over them with the mouse
  6. Note the css :hover effect: background turns white, but text remains white and so disappears
Related issues/PRs

None found

Suggest a fix/enhancement

In styles.mustache, after

  .sidenav > li > a:hover {
    background-color: #ffffff;
  }

(around line 304), a class could be added as follows:

  .sidenav > li.nav-header > a:hover {
    color: #4c8eca;
  }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in modules/swagger-codegen/src/main/resources/htmlDocs2/styles.mustache around the .sidenav hover rules near line 301. Reproduce the generated html2 documentation in a browser and verify that navigation section headers retain readable text when hovered; confirm the result in the generated index.html.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html
Domain
documentation
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.