bashtage / sphinx-material

A material-based, responsive theme inspired by mkdocs-material
Other
312 stars 91 forks source link

Permalink buttons are invisible #121

Open Yura52 opened 2 years ago

Yura52 commented 2 years ago

For some items (from my observations, those are usually API entries automatically generated by Sphinx), the button for getting the permalink is invisible. It is not the case for sphinx-rtd-theme, for example, so I guess it may be a bug.

Screenshot 2021-10-25 at 21 54 11
Yura52 commented 2 years ago

I am not a web developer by any means, but this is my solution

# conf.py
...
html_static_path = ['_static']
html_css_files = ['my_styles.css']
/* _static/my_styles.css */

h1 > a.headerlink,
h2 > a.headerlink,
h3 > a.headerlink,
h4 > a.headerlink,
h5 > a.headerlink,
dl.py > dt.sig.sig-object.py a.headerlink {
    /* Example: color: dimgrey !important; */
    color: <your color here> !important;
    display: initial !important;
    transition: initial !important;
}

h1 > a.headerlink:hover,
h2 > a.headerlink:hover,
h3 > a.headerlink:hover,
h4 > a.headerlink:hover,
h5 > a.headerlink:hover,
dl.py > dt.sig.sig-object.py a.headerlink:hover {
    /* Example: color: black !important; */
    color: <your color here> !important;
}

h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
dl.py > dt.sig.sig-object.py:hover a.headerlink {
    opacity: initial !important;
}