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

[MRG] Updates CSS to be compatible with Sphinx 2.1 #13982

Merged
merged 11 commits into from Jul 24, 2019

Conversation

amueller
Copy link
Member

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.

@thomasjpfan
Copy link
Member

Which version of sphinx are you working on? We most likely need to do some work with when updating to sphinx 2.0.

@amueller
Copy link
Member Author

actually seems to work fine otherwise. Using 2.0.1 now. But this breaks even before 2.0

@amueller
Copy link
Member Author

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.

@amueller
Copy link
Member Author

Introduced in 1.7 (if the comment is accurate): sphinx-doc/sphinx#4246

@amueller
Copy link
Member Author

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.

@thomasjpfan
Copy link
Member

We can see what it looks like by updating builds_tools/circle/build_doc.sh:121, with sphinx=2.0.1.

@amueller
Copy link
Member Author

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.

@thomasjpfan
Copy link
Member

Locally it looks a little strange. There will most likely be some css we need to adjust.

@amueller
Copy link
Member Author

@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...

@thomasjpfan
Copy link
Member

I'll look into it, sphinx 2.0 places more things into <p> such as: https://60129-843222-gh.circle-artifacts.com/0/doc/modules/classes.html

@thomasjpfan
Copy link
Member

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)

@amueller
Copy link
Member Author

I'm not sure if we should wait for 1.0 for that ;)

@jnothman
Copy link
Member

jnothman commented Jun 3, 2019

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...

@thomasjpfan
Copy link
Member

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.

@thomasjpfan
Copy link
Member

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%;
    }	
}

@jnothman
Copy link
Member

jnothman commented Jun 20, 2019 via email

@thomasjpfan thomasjpfan changed the title set body max width for sphinx template [MRG] Updates CSS to be compatible with Sphinx 2.0 Jul 22, 2019
@amueller
Copy link
Member Author

@thomasjpfan you looked at this in more detail than me. Is this good to go?
Looks like sphinx==1.6.2 doesn't exist on conda any more lol.

@thomasjpfan thomasjpfan changed the title [MRG] Updates CSS to be compatible with Sphinx 2.0 [MRG] Updates CSS to be compatible with Sphinx 2.1 Jul 22, 2019
@thomasjpfan
Copy link
Member

@amueller This is good to go.

Copy link
Member

@jnothman jnothman left a 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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 {

@adrinjalali
Copy link
Member

The rendered version looks ok, as far as I can see.

@jnothman jnothman merged commit 55895bc into scikit-learn:master Jul 24, 2019
@jnothman
Copy link
Member

Thanks @thomasjpfan for finishing this off.

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 this pull request may close these issues.

None yet

4 participants