readthedocs / sphinx_rtd_theme

Sphinx theme from Read the Docs
https://sphinx-rtd-theme.readthedocs.io/
MIT License
4.74k stars 1.73k forks source link

Function and variable signatures look too "compressed" #322

Open parkerhoyes opened 8 years ago

parkerhoyes commented 8 years ago

I don't know if this is just me being nitpicky, but the spacing between words in function and variable signatures seems to be too close together. Here's a picture:

before

With a little bit of CSS tweaking in the browser I was able to achieve this effect:

after

All I did was add the following CSS:

.rst-content dl:not(.docutils) dt {
    word-spacing: 4px;
}

I was also able to add spacing only before the function / variable name like so:

code-only

This effect was achieving by adding the following CSS:

.rst-content dl:not(.docutils).function code.descname, .rst-content dl:not(.docutils).member code.descname, .rst-content dl:not(.docutils).var code.descname {
    padding-left: 4px;
}

Let me know what you guys think. If this is a change you'd like to make, I can modify the SASS code and submit a PR if you'd like.

Blendify commented 7 years ago

Looks good.