From ddc0f7e65217c00cbd5eeaf05c56917def365bfb Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Tue, 10 Jan 2023 11:43:13 +1100 Subject: [PATCH] Theme improvements to IfcOpenShell docs --- src/ifcopenshell-python/docs/_static/custom.css | 13 +++++++++++++ src/ifcopenshell-python/docs/conf.py | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/docs/_static/custom.css b/src/ifcopenshell-python/docs/_static/custom.css index 4ecfae2065..69f9d25e32 100644 --- a/src/ifcopenshell-python/docs/_static/custom.css +++ b/src/ifcopenshell-python/docs/_static/custom.css @@ -15,3 +15,16 @@ section img { box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px; border-radius: 5px; } +.py.class { + /* Make it clearer which signatures are part of a class */ + border-left: 3px solid var(--color-brand-primary); +} +.py.function, .py.method { + /* Make it clearer which signatures are part of a method or function */ + border-left: 3px solid var(--color-background-item); +} +.field-list > dt { + /* Clearly distinguish parameters otherwise it looks like a wall of text */ + color: var(--color-brand-content); + font-style: italic; +} diff --git a/src/ifcopenshell-python/docs/conf.py b/src/ifcopenshell-python/docs/conf.py index 5fb3475e87..7335a4c80a 100644 --- a/src/ifcopenshell-python/docs/conf.py +++ b/src/ifcopenshell-python/docs/conf.py @@ -96,7 +96,6 @@ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -# html_theme = "furo" # Add any paths that contain custom static files (such as style sheets) here, @@ -105,3 +104,8 @@ html_theme = "furo" html_static_path = ["_static"] html_css_files = ["custom.css"] + +# Code block styles. Dark styling helps important code examples "pop" on the +# page even on light themes. +pygments_style = "one-dark" +pygments_dark_style = "one-dark"