swagger-api / swagger-api/swagger-codegen
[html2] generated api documentation section headers are white on white on mouseover
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
- Create a valid OAS API in SwaggerHub online
- Download autogenerated documentation by clicking
Export > Documentation > html2 - Open the resulting
index.htmlfile in a browser - Note the navigation section headers in the upper left (white text on blue background)
- Hover over them with the mouse
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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