Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird formatting for ..versiondeprecated #242

Closed
eric-wieser opened this issue Sep 1, 2020 · 3 comments · Fixed by #243
Closed

Weird formatting for ..versiondeprecated #242

eric-wieser opened this issue Sep 1, 2020 · 3 comments · Fixed by #243

Comments

@eric-wieser
Copy link

eric-wieser commented Sep 1, 2020

We're seeing this behavior in the numpy docs:

image

The double borders strike me as unintentional. The HTML in question is:

<div class="deprecated">
<p><span class="versionmodified deprecated">Deprecated since version 1.20: </span>The native libraries on macOS, provided by Accelerate, are not fit for use
in NumPy since they have bugs that cause wrong output under easily reproducible
conditions. If the vendor fixes those bugs, the library could be reinstated,
but until then users compiling for themselves should use another linear
algebra library or use the built-in (but slower) default, see the next
section.</p>
</div>

and the offending scss is

https://github.com/pandas-dev/pydata-sphinx-theme/blob/236d4c6d1f10f5da064d929e9eb594daecf23551/src/scss/index.scss#L18-L29

@jorisvandenbossche
Copy link
Member

Indeed, that's certainly unintentional. Thanks for the catch!
We have the same issue on the pandas docs, eg https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.api.types.is_extension_type.html

Now, this css is coming from pandas/scikit-learn docs (pandas-dev/pandas#20349, pandas-dev/pandas#20357), and was working at the time, see eg https://pandas.pydata.org/pandas-docs/version/0.23/generated/pandas.DataFrame.from_csv.html
The difference seems to be in the generated html. At the time, "deprecated" was only a class in the surrounding div, and not in the span.

@jorisvandenbossche
Copy link
Member

Looking at the css currently in scikit-learn, I think the fix should be simple: adding a "div" selector to the deprecated styling (so it is not applied to the span).

@jorisvandenbossche
Copy link
Member

PR -> #243

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants