Skip to content

Commit

Permalink
Merge pull request #686 from Tomaz-Vieira/interactive_docs_styling
Browse files Browse the repository at this point in the history
Reduces border and padding noise
  • Loading branch information
FynnBe authored Feb 24, 2025
2 parents af7d7f6 + 1acc742 commit 5f325ca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions scripts/interactive_docs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def generate_docs(*, raw_type: Any, root_path: List[str]) -> "str | Exception":
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/school-book.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/yaml.min.js"></script>
Expand Down
12 changes: 9 additions & 3 deletions scripts/interactive_docs/hint.py
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,6 @@ def get_css(cls) -> str:
{subclasses_css}
table{{
border: {theme_border};
border-collapse: collapse;
}}
th{{
Expand All @@ -1422,9 +1421,14 @@ def get_css(cls) -> str:
/*border*/
td, th{{
border: {theme_border};
border-collapse: collapse;
}}
tr{{
border-bottom: solid 1px black;
}}
tr:last-child{{
border-bottom: 0;
}}
th{{
padding: {theme_spacing};
Expand Down Expand Up @@ -1663,7 +1667,7 @@ def get_css(cls) -> str:
"""

def __init__(
self, root_element_id: str, style: str = "float: right; margin-left: 4em;"
self, root_element_id: str, style: str = "float: right; margin-left: 4em; margin-right: 1em;"
):
# fmt: off
super().__init__(
Expand Down Expand Up @@ -1732,6 +1736,8 @@ def get_css(cls) -> str:
background-color: #84b4dd;
font-weight: bold;
padding: 0.3em;
padding-right: 0;
padding-bottom: 0;
}}
.{cls.EXAMPLE_FIELD_CSS_CLASS}{{
background-color: #f6f5b2;
Expand Down

0 comments on commit 5f325ca

Please sign in to comment.