Skip to content

Commit

Permalink
DOC Updates CSS to be compatible with Sphinx 2.1 (#13982)
Browse files Browse the repository at this point in the history
  • Loading branch information
amueller authored and jnothman committed Jul 24, 2019
1 parent 5fb0ff8 commit 55895bc
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build_tools/circle/build_doc.sh
Expand Up @@ -121,7 +121,7 @@ export CCACHE_COMPRESS=1
# provided versions
conda create -n $CONDA_ENV_NAME --yes --quiet python="${PYTHON_VERSION:-*}" \
numpy="${NUMPY_VERSION:-*}" scipy="${SCIPY_VERSION:-*}" cython \
pytest coverage matplotlib="${MATPLOTLIB_VERSION:-*}" sphinx=1.6.2 pillow \
pytest coverage matplotlib="${MATPLOTLIB_VERSION:-*}" sphinx=2.1.2 pillow \
scikit-image="${SCIKIT_IMAGE_VERSION:-*}" pandas="${PANDAS_VERSION:-*}" \
joblib

Expand Down
7 changes: 5 additions & 2 deletions doc/conf.py
Expand Up @@ -56,7 +56,10 @@
'MathJax.js?config=TeX-AMS_SVG')


autodoc_default_flags = ['members', 'inherited-members']
autodoc_default_options = {
'members': True,
'inherited-members': True
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ['templates']
Expand Down Expand Up @@ -138,7 +141,7 @@
# documentation.
html_theme_options = {'oldversion': False, 'collapsiblesidebar': True,
'google_analytics': True, 'surveybanner': False,
'sprintbanner': True}
'sprintbanner': True, 'body_max_width': None}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = ['themes']
Expand Down
65 changes: 54 additions & 11 deletions doc/themes/scikit-learn/static/nature.css_t
Expand Up @@ -197,6 +197,10 @@ div.navbar div.nav-icon {
}
}

.section > p {
margin-top: 1em;
}

/*-------------------------------------------------------------*/
/* The next few elements have to do with the gsc (referring to */
/* Google's custom search bar */
Expand Down Expand Up @@ -233,6 +237,10 @@ input.gsc-search-button {
background-color: #ff9c34 !important;
}

.gsc-search-button-v2 {
line-height: 1em;
}

a.gs-title, a.gs-title > b{
color: blue !important;
}
Expand Down Expand Up @@ -525,13 +533,13 @@ div.bodywrapper {


div.bodywrapper h1 {
margin: 0 -10px 0 -10px;
text-align: center;
background-color: #cde8ef;
font-family: Helvetica, Arial, sans-serif;
font-size: 190%;
border-radius: 0 15px 0 15px;
-moz-border-radius: 0 15px 0 15px;
margin: 0 0 0 0;
}

div.body h3 {
Expand All @@ -540,9 +548,9 @@ div.body h3 {
padding: 5px;
border-radius: 10px;
}
div.body h4 {
font-size: 110%;
background-color: #F4F4F4;
div.body h4 {
font-size: 110%;
background-color: #F4F4F4;
padding: 5px;
border-radius: 10px;
}
Expand Down Expand Up @@ -870,11 +878,6 @@ pre {
margin: .1em 0 .5em 0;
}

div.body p {
margin-top: 1.2em;
margin-bottom: .1em;
}

.float-right {
float: right;
}
Expand Down Expand Up @@ -1105,6 +1108,11 @@ p.citing {

.field-odd, .field-even {
background-color: #fff;
margin-top: 0;
}

.field-odd > dl, .field-even > dl {
margin-top: 0;
}

.field-name {
Expand All @@ -1115,6 +1123,40 @@ p.citing {
background-color: #fff;
}

dl.field-list > dt {
flex-basis: 12%;
}

dl.field-list > dd {
flex-basis: 88%;
}

@media screen and (max-width: 780px) {

dl.field-list > dt {
flex-basis: 100%;
}

dl.field-list > dd {
flex-basis: 100%;
}
}

.field-odd, .field-even {
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
box-sizing: border-box;
}

dt.field-odd, dt.field-even {
background-color: #F0F7FA;
padding: 4px 0 0 4px;
}

dd.field-odd, dd.field-even {
padding-top: 0.3em;
}

dl.class > dt, dl.function > dt, dl.method > dt {
padding: 10px;
background-color: #f8f8f8;
Expand All @@ -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 {
font-size: 0.9em;
background-color: transparent;
border-radius: 0px;
color: #1D1F22;
text-shadow: none;
}

table.longtable {
table.longtable p {
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
line-height: 1em;
}

/*----- testimonials ----------*/
Expand Down

0 comments on commit 55895bc

Please sign in to comment.