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
[MRG] Updates CSS to be compatible with Sphinx 2.1 #13982
Conversation
Which version of sphinx are you working on? We most likely need to do some work with when updating to sphinx 2.0. |
actually seems to work fine otherwise. Using 2.0.1 now. But this breaks even before 2.0 |
hm ok I was hoping unused options are just ignored :-/ we could add an "if" in there depending on the version? I'm not entirely sure when this was introduced, would need to check. |
Introduced in 1.7 (if the comment is accurate): sphinx-doc/sphinx#4246 |
I think updating our build environment would be best. Not sure if we should update it to 2.0.1? Ideally we'd have it work with multiple versions but right now it only works with versions that are more than a year old. |
We can see what it looks like by updating |
And if it looks good we keep it? Not the best way to validate but I guess we can always fix it later if we find issues. |
Locally it looks a little strange. There will most likely be some css we need to adjust. |
@thomasjpfan do you want to look into it or should I? Looked roughly fine but wasn't paying that much attention to details ;) Gonna review KNNImputer now... |
I'll look into it, sphinx 2.0 places more things into |
For scikit-learn 1.0, we could think about redoing the website. The current CSS is a bit nuts. (Got to use those awesome web development skills I picked up) |
I'm not sure if we should wait for 1.0 for that ;) |
There's little that we should wait for 1.0 for! Certainly not web development, which is quite independent of semantic versioning... |
I meant to say “a redesigned website would be nice for 1.0, (it would be great to have it before 1.0)”. As for this PR, it only works for Sphinx >= 2.0. |
In honor of #9503, this PR was updated with small screen support: @media screen and (max-width: 780px) {
dl.field-list > dt {
flex-basis: 100%;
}
dl.field-list > dd {
flex-basis: 100%;
}
} |
I don't think there's much risk in forcing documentation builders to
upgrade to Sphinx 2
|
@thomasjpfan you looked at this in more detail than me. Is this good to go? |
@amueller This is good to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo and cosmetics. I've not looked at rendering
padding: 4px 0 0 4px; | ||
} | ||
|
||
dd.field-old, dd.field-even { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dd.field-old, dd.field-even { | |
dd.field-odd, dd.field-even { |
font-size: 0.9em; | ||
background-color: transparent; | ||
border-radius: 0px; | ||
color: #1D1F22; | ||
text-shadow: none; | ||
} | ||
|
||
table.longtable { | ||
table.longtable p{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
table.longtable p{ | |
table.longtable p { |
@@ -1137,19 +1179,20 @@ table.docutils.citation td, table.docutils.citation tr, table.docutils.footnote | |||
background-color: transparent; | |||
} | |||
|
|||
table.docutils.citation tr td.label, table.docutils.footnote tr td.label { | |||
table.docutils.citation tr td.label, table.docutils.footnote tr td.label dt.label{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
table.docutils.citation tr td.label, table.docutils.footnote tr td.label dt.label{ | |
table.docutils.citation tr td.label, table.docutils.footnote tr td.label dt.label { |
The rendered version looks ok, as far as I can see. |
Thanks @thomasjpfan for finishing this off. |
This makes the website look reasonable with more recent versions of sphinx. It took me forever to figure this out :-/
I'm not sure how we want to deal with changing sphinx versions, I don't think we have a general policy. Right now circle has a pinned version but I don't think we specify that anywhere else.