Skip to content

Commit

Permalink
Print each argument on new line in Python docs (#2207)
Browse files Browse the repository at this point in the history
  • Loading branch information
zundertj committed Dec 29, 2021
1 parent a5ba054 commit b4aab5d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions py-polars/docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* source: https://github.com/sphinx-doc/sphinx/issues/1514#issuecomment-742703082 */

/* Newlines (\a) and spaces (\20) before each parameter */
.sig-param::before {
content: "\a\20\20\20\20";
white-space: pre;
}

/* Newline after the last parameter (so the closing bracket is on a new line) */
dt em.sig-param:last-of-type::after {
content: "\a";
white-space: pre;
}

/* To have blue background of width of the block (instead of width of content) */
dl.class > dt:first-of-type {
display: block !important;
}
3 changes: 2 additions & 1 deletion py-polars/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ["_static"]
html_static_path = ["_static"]
html_css_files = ["css/custom.css"] # relative to html_static_path

html_logo = "../img/polars_logo.png"
autosummary_generate = True
Expand Down

0 comments on commit b4aab5d

Please sign in to comment.