diff --git a/repo_helper/files/docs.py b/repo_helper/files/docs.py index 7149d0d8..db9f1643 100644 --- a/repo_helper/files/docs.py +++ b/repo_helper/files/docs.py @@ -33,7 +33,7 @@ import shutil import warnings from contextlib import suppress -from typing import List +from typing import Dict, List, Mapping, MutableMapping # 3rd party import dict2css @@ -384,120 +384,78 @@ def make_alabaster_theming() -> str: :return: The custom stylesheet. """ - sheet = dict2css.StyleSheet() - # Common options solid_border = {"border-style": "solid"} docs_bottom_margin = {"margin-bottom": (dict2css.px(17), dict2css.IMPORTANT)} - sheet.add_style("li p:last-child", {"margin-bottom": dict2css.px(12)}) - - # Smooth scrolling between sections - sheet.add_style("html", {"scroll-behavior": "smooth"}) - - # Border around classes - sheet.add_style( - "dl.class", - { - "padding": "3px 3px 3px 5px", - "margin-top": ("7px", dict2css.IMPORTANT), - **docs_bottom_margin, - "border-color": "rgba(240, 128, 128, 0.5)", - **solid_border, - } - ) + object_border = {"padding": "3px 3px 3px 5px", **docs_bottom_margin, **solid_border} - # Border around functions - sheet.add_style( - "dl.function", - { - "padding": "3px 3px 3px 5px", - "margin-top": ("7px", dict2css.IMPORTANT), - **docs_bottom_margin, - "border-color": "lightskyblue", - **solid_border, - } - ) + class_border = { + **object_border, + "margin-top": ("7px", dict2css.IMPORTANT), + "border-color": "rgba(240, 128, 128, 0.5)", + } - sheet.add_style("dl.function dt", {"margin-bottom": (dict2css.px(10), dict2css.IMPORTANT)}) - - # Border around attributes - sheet.add_style( - "dl.attribute", - { - "padding": "3px 3px 3px 5px", - **docs_bottom_margin, - "border-color": "rgba(119, 136, 153, 0.5)", - **solid_border - } - ) + function_border = { + **object_border, + "margin-top": ("7px", dict2css.IMPORTANT), + "border-color": "lightskyblue", + } - # Border around Methods - sheet.add_style( - "dl.method", - { - "padding": "3px 3px 3px 5px", - **docs_bottom_margin, - "border-color": "rgba(32, 178, 170, 0.5)", - **solid_border - } - ) + attribute_border = {**object_border, "border-color": "rgba(119, 136, 153, 0.5)"} + method_border = {**object_border, "border-color": "rgba(32, 178, 170, 0.5)"} - sheet.add_style("div.sphinxsidebar", {"font-size": dict2css.px(14), "line-height": "1.5"}) - sheet.add_style("div.sphinxsidebar h3", {"font-weight": "bold"}) - sheet.add_style("div.sphinxsidebar p.caption", {"font-size": dict2css.px(20)}) - sheet.add_style( - "div.sphinxsidebar div.sphinxsidebarwrapper", {"padding-right": (dict2css.px(20), dict2css.IMPORTANT)} - ) + table_vertical_margins = { + "margin-bottom": (dict2css.px(20), "important"), + "margin-top": (dict2css.px(-15), dict2css.IMPORTANT), + } - # Margin above and below table - sheet.add_style( - "table.longtable", { - "margin-bottom": (dict2css.px(20), "important"), - "margin-top": (dict2css.px(-15), dict2css.IMPORTANT) - } - ) + style: Dict[str, MutableMapping] = { + "li p:last-child": {"margin-bottom": dict2css.px(12)}, + "html": {"scroll-behavior": "smooth"}, # Smooth scrolling between sections + "dl.class": class_border, + "dl.function": function_border, + "dl.function dt": {"margin-bottom": (dict2css.px(10), dict2css.IMPORTANT)}, + "dl.attribute": attribute_border, + "dl.method": method_border, + "div.sphinxsidebar": {"font-size": dict2css.px(14), "line-height": "1.5"}, + "div.sphinxsidebar h3": {"font-weight": "bold"}, + "div.sphinxsidebar p.caption": {"font-size": dict2css.px(20)}, + "div.sphinxsidebar div.sphinxsidebarwrapper": {"padding-right": (dict2css.px(20), dict2css.IMPORTANT)}, + "table.longtable": table_vertical_margins, + } - # The following styling from Tox"s documentation + # The following styling from Tox's documentation # https://github.com/tox-dev/tox/blob/master/docs/_static/custom.css # MIT Licensed # Page width - sheet.add_style("div.document", {"width": "100%", "max-width": dict2css.px(1400)}) - sheet.add_style("div.body", {"max-width": dict2css.px(1100)}) + style["div.document"] = {"width": "100%", "max-width": dict2css.px(1400)} + style["div.body"] = {"max-width": dict2css.px(1100)} # No end-of-line hyphenation - sheet.add_style("div.body p, ol > li, div.body td", {"hyphens": None}) - - sheet.add_style("img, div.figure", {"margin": ('0', dict2css.IMPORTANT)}) - sheet.add_style("ul > li", {"text-align": "justify"}) - sheet.add_style("ul > li > p", {"margin-bottom": '0'}) - sheet.add_style("ol > li > p", {"margin-bottom": '0'}) - sheet.add_style("div.body code.descclassname", {"display": None}) - sheet.add_style(".wy-table-responsive table td", {"white-space": ("normal", dict2css.IMPORTANT)}) - sheet.add_style(".wy-table-responsive", {"overflow": ("visible", dict2css.IMPORTANT)}) - sheet.add_style("div.toctree-wrapper.compound > ul > li", { + style["div.body p, ol > li, div.body td"] = {"hyphens": None} + + style["img, div.figure"] = {"margin": ('0', dict2css.IMPORTANT)} + style["ul > li"] = {"text-align": "justify"} + style["ul > li > p"] = {"margin-bottom": '0'} + style["ol > li > p"] = {"margin-bottom": '0'} + style["div.body code.descclassname"] = {"display": None} + style[".wy-table-responsive table td"] = {"white-space": ("normal", dict2css.IMPORTANT)} + style[".wy-table-responsive"] = {"overflow": ("visible", dict2css.IMPORTANT)} + style["div.toctree-wrapper.compound > ul > li"] = { "margin": '0', "padding": '0', - }) + } # TODO # code.docutils.literal {{ # background-color: #ECF0F3; # padding: 0 1px; # }} - with dict2css.CSSSerializer(trailing_semicolon=True).use(): - stylesheet = sheet.tostring().replace('}', "}\n") + style["@media screen and (min-width: 870px)"] = {"div.sphinxsidebar": {"width": "250px"}} - return f"""\ -{stylesheet} - -@media screen and (min-width: 870px) {{ - div.sphinxsidebar {{ - width: 250px; - }} -}} -""" + return dict2css.dumps(style, trailing_semicolon=True) def make_readthedocs_theming() -> str: @@ -507,7 +465,7 @@ def make_readthedocs_theming() -> str: :return: The custom stylesheet. """ - style = { + style: Dict[str, Mapping] = { ".wy-nav-content": {"max-width": (dict2css.px(1200), dict2css.IMPORTANT)}, "li p:last-child": {"margin-bottom": (dict2css.px(12), dict2css.IMPORTANT)}, "html": {"scroll-behavior": "smooth"}, diff --git a/requirements.txt b/requirements.txt index 22b23bec..d7b8755d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ attrs>=20.2.0 click==7.1.2 configconfig>=0.4.0 consolekit>=0.8.0 -dict2css>=0.1.0 +dict2css>=0.2.0 domdf-python-tools>=2.0.1 dulwich>=0.19.16 email-validator==1.1.2 diff --git a/tests/test_cli/test_show_/test_requirements_3_6_.tree b/tests/test_cli/test_show_/test_requirements_3_6_.tree index 3e6cf8d1..f66e7c8f 100644 --- a/tests/test_cli/test_show_/test_requirements_3_6_.tree +++ b/tests/test_cli/test_show_/test_requirements_3_6_.tree @@ -97,7 +97,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_cli/test_show_/test_requirements_3_7_.tree b/tests/test_cli/test_show_/test_requirements_3_7_.tree index 28070313..2151993f 100644 --- a/tests/test_cli/test_show_/test_requirements_3_7_.tree +++ b/tests/test_cli/test_show_/test_requirements_3_7_.tree @@ -91,7 +91,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_cli/test_show_/test_requirements_3_8_.tree b/tests/test_cli/test_show_/test_requirements_3_8_.tree index 7ddce27e..a59efea5 100644 --- a/tests/test_cli/test_show_/test_requirements_3_8_.tree +++ b/tests/test_cli/test_show_/test_requirements_3_8_.tree @@ -79,7 +79,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_cli/test_show_/test_requirements_3_9__.tree b/tests/test_cli/test_show_/test_requirements_3_9__.tree index 1fb4aafb..1b965885 100644 --- a/tests/test_cli/test_show_/test_requirements_3_9__.tree +++ b/tests/test_cli/test_show_/test_requirements_3_9__.tree @@ -78,7 +78,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_cli/test_show_/test_requirements_concise_3_6_.tree b/tests/test_cli/test_show_/test_requirements_concise_3_6_.tree index f293f969..a3c9f25b 100644 --- a/tests/test_cli/test_show_/test_requirements_concise_3_6_.tree +++ b/tests/test_cli/test_show_/test_requirements_concise_3_6_.tree @@ -14,7 +14,7 @@ repo_helper==2020.12.18 ├── css-parser==1.0.6 ├── deprecation>=2.1.0 ├── deprecation-alias>=0.1.1 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 ├── distlib<1,>=0.3.1 ├── dnspython>=1.15.0 ├── domdf-python-tools>=2.2.0 diff --git a/tests/test_cli/test_show_/test_requirements_concise_3_7_.tree b/tests/test_cli/test_show_/test_requirements_concise_3_7_.tree index 44f98578..2598bff7 100644 --- a/tests/test_cli/test_show_/test_requirements_concise_3_7_.tree +++ b/tests/test_cli/test_show_/test_requirements_concise_3_7_.tree @@ -14,7 +14,7 @@ repo_helper==2020.12.18 ├── css-parser==1.0.6 ├── deprecation>=2.1.0 ├── deprecation-alias>=0.1.1 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 ├── distlib<1,>=0.3.1 ├── dnspython>=1.15.0 ├── domdf-python-tools>=2.2.0 diff --git a/tests/test_cli/test_show_/test_requirements_concise_3_8_.tree b/tests/test_cli/test_show_/test_requirements_concise_3_8_.tree index 0908b886..644745c9 100644 --- a/tests/test_cli/test_show_/test_requirements_concise_3_8_.tree +++ b/tests/test_cli/test_show_/test_requirements_concise_3_8_.tree @@ -14,7 +14,7 @@ repo_helper==2020.12.18 ├── css-parser==1.0.6 ├── deprecation>=2.1.0 ├── deprecation-alias>=0.1.1 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 ├── distlib<1,>=0.3.1 ├── dnspython>=1.15.0 ├── domdf-python-tools>=2.2.0 diff --git a/tests/test_cli/test_show_/test_requirements_concise_3_9__.tree b/tests/test_cli/test_show_/test_requirements_concise_3_9__.tree index 89b53eee..b6eaad41 100644 --- a/tests/test_cli/test_show_/test_requirements_concise_3_9__.tree +++ b/tests/test_cli/test_show_/test_requirements_concise_3_9__.tree @@ -14,7 +14,7 @@ repo_helper==2020.12.18 ├── css-parser==1.0.6 ├── deprecation>=2.1.0 ├── deprecation-alias>=0.1.1 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 ├── distlib<1,>=0.3.1 ├── dnspython>=1.15.0 ├── domdf-python-tools>=2.2.0 diff --git a/tests/test_cli/test_show_/test_requirements_no_pager_3_6_.tree b/tests/test_cli/test_show_/test_requirements_no_pager_3_6_.tree index 3e6cf8d1..f66e7c8f 100644 --- a/tests/test_cli/test_show_/test_requirements_no_pager_3_6_.tree +++ b/tests/test_cli/test_show_/test_requirements_no_pager_3_6_.tree @@ -97,7 +97,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_cli/test_show_/test_requirements_no_pager_3_7_.tree b/tests/test_cli/test_show_/test_requirements_no_pager_3_7_.tree index 28070313..2151993f 100644 --- a/tests/test_cli/test_show_/test_requirements_no_pager_3_7_.tree +++ b/tests/test_cli/test_show_/test_requirements_no_pager_3_7_.tree @@ -91,7 +91,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_cli/test_show_/test_requirements_no_pager_3_8_.tree b/tests/test_cli/test_show_/test_requirements_no_pager_3_8_.tree index 7ddce27e..a59efea5 100644 --- a/tests/test_cli/test_show_/test_requirements_no_pager_3_8_.tree +++ b/tests/test_cli/test_show_/test_requirements_no_pager_3_8_.tree @@ -79,7 +79,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_cli/test_show_/test_requirements_no_pager_3_9__.tree b/tests/test_cli/test_show_/test_requirements_no_pager_3_9__.tree index 1fb4aafb..1b965885 100644 --- a/tests/test_cli/test_show_/test_requirements_no_pager_3_9__.tree +++ b/tests/test_cli/test_show_/test_requirements_no_pager_3_9__.tree @@ -78,7 +78,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_cli/test_show_requirements_win_/test_requirements_3_6_.tree b/tests/test_cli/test_show_requirements_win_/test_requirements_3_6_.tree index 3e6cf8d1..f66e7c8f 100644 --- a/tests/test_cli/test_show_requirements_win_/test_requirements_3_6_.tree +++ b/tests/test_cli/test_show_requirements_win_/test_requirements_3_6_.tree @@ -97,7 +97,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_cli/test_show_requirements_win_/test_requirements_3_7_.tree b/tests/test_cli/test_show_requirements_win_/test_requirements_3_7_.tree index 28070313..2151993f 100644 --- a/tests/test_cli/test_show_requirements_win_/test_requirements_3_7_.tree +++ b/tests/test_cli/test_show_requirements_win_/test_requirements_3_7_.tree @@ -91,7 +91,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_cli/test_show_requirements_win_/test_requirements_3_8_.tree b/tests/test_cli/test_show_requirements_win_/test_requirements_3_8_.tree index 7ddce27e..a59efea5 100644 --- a/tests/test_cli/test_show_requirements_win_/test_requirements_3_8_.tree +++ b/tests/test_cli/test_show_requirements_win_/test_requirements_3_8_.tree @@ -79,7 +79,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_cli/test_show_requirements_win_/test_requirements_3_9__.tree b/tests/test_cli/test_show_requirements_win_/test_requirements_3_9__.tree index 1fb4aafb..1b965885 100644 --- a/tests/test_cli/test_show_requirements_win_/test_requirements_3_9__.tree +++ b/tests/test_cli/test_show_requirements_win_/test_requirements_3_9__.tree @@ -78,7 +78,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_6_.tree b/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_6_.tree index f293f969..a3c9f25b 100644 --- a/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_6_.tree +++ b/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_6_.tree @@ -14,7 +14,7 @@ repo_helper==2020.12.18 ├── css-parser==1.0.6 ├── deprecation>=2.1.0 ├── deprecation-alias>=0.1.1 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 ├── distlib<1,>=0.3.1 ├── dnspython>=1.15.0 ├── domdf-python-tools>=2.2.0 diff --git a/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_7_.tree b/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_7_.tree index 44f98578..2598bff7 100644 --- a/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_7_.tree +++ b/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_7_.tree @@ -14,7 +14,7 @@ repo_helper==2020.12.18 ├── css-parser==1.0.6 ├── deprecation>=2.1.0 ├── deprecation-alias>=0.1.1 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 ├── distlib<1,>=0.3.1 ├── dnspython>=1.15.0 ├── domdf-python-tools>=2.2.0 diff --git a/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_8_.tree b/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_8_.tree index 0908b886..644745c9 100644 --- a/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_8_.tree +++ b/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_8_.tree @@ -14,7 +14,7 @@ repo_helper==2020.12.18 ├── css-parser==1.0.6 ├── deprecation>=2.1.0 ├── deprecation-alias>=0.1.1 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 ├── distlib<1,>=0.3.1 ├── dnspython>=1.15.0 ├── domdf-python-tools>=2.2.0 diff --git a/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_9__.tree b/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_9__.tree index 89b53eee..b6eaad41 100644 --- a/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_9__.tree +++ b/tests/test_cli/test_show_requirements_win_/test_requirements_concise_3_9__.tree @@ -14,7 +14,7 @@ repo_helper==2020.12.18 ├── css-parser==1.0.6 ├── deprecation>=2.1.0 ├── deprecation-alias>=0.1.1 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 ├── distlib<1,>=0.3.1 ├── dnspython>=1.15.0 ├── domdf-python-tools>=2.2.0 diff --git a/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_6_.tree b/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_6_.tree index 3e6cf8d1..f66e7c8f 100644 --- a/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_6_.tree +++ b/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_6_.tree @@ -97,7 +97,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_7_.tree b/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_7_.tree index 28070313..2151993f 100644 --- a/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_7_.tree +++ b/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_7_.tree @@ -91,7 +91,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_8_.tree b/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_8_.tree index 7ddce27e..a59efea5 100644 --- a/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_8_.tree +++ b/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_8_.tree @@ -79,7 +79,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_9__.tree b/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_9__.tree index 1fb4aafb..1b965885 100644 --- a/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_9__.tree +++ b/tests/test_cli/test_show_requirements_win_/test_requirements_no_pager_3_9__.tree @@ -78,7 +78,7 @@ repo_helper==2020.12.18 │ │ └── typing-extensions>=3.7.4.3 │ ├── mistletoe>=0.7.2 │ └── typing-extensions>=3.7.4.3 -├── dict2css>=0.1.0 +├── dict2css>=0.2.0 │ ├── css-parser==1.0.6 │ └── domdf-python-tools>=2.2.0 │ ├── deprecation-alias>=0.1.1 diff --git a/tests/test_files/test_docs.py b/tests/test_files/test_docs.py index f53d8b8e..85f6d16b 100644 --- a/tests/test_files/test_docs.py +++ b/tests/test_files/test_docs.py @@ -2,7 +2,7 @@ # # test_docs.py # -# Copyright © 2020 Dominic Davis-Foster +# Copyright © 2020-2021 Dominic Davis-Foster # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by @@ -172,7 +172,7 @@ def test_make_conf(tmp_pathplus, demo_environment, file_regression, theme): def test_make_alabaster_theming(file_regression): - check_file_regression(make_alabaster_theming(), file_regression, "style.css") + check_file_regression(make_alabaster_theming(), file_regression, "_style.css") def test_make_readthedocs_theming(file_regression): diff --git a/tests/test_files/test_docs_/test_copy_docs_styling_alabaster_style.css b/tests/test_files/test_docs_/test_copy_docs_styling_alabaster_style.css index e3c04814..904bb572 100644 --- a/tests/test_files/test_docs_/test_copy_docs_styling_alabaster_style.css +++ b/tests/test_files/test_docs_/test_copy_docs_styling_alabaster_style.css @@ -10,18 +10,18 @@ html { dl.class { padding: 3px 3px 3px 5px; - margin-top: 7px !important; margin-bottom: 17px !important; - border-color: rgba(240, 128, 128, 0.5); border-style: solid; + margin-top: 7px !important; + border-color: rgba(240, 128, 128, 0.5); } dl.function { padding: 3px 3px 3px 5px; - margin-top: 7px !important; margin-bottom: 17px !important; - border-color: lightskyblue; border-style: solid; + margin-top: 7px !important; + border-color: lightskyblue; } dl.function dt { @@ -31,15 +31,15 @@ dl.function dt { dl.attribute { padding: 3px 3px 3px 5px; margin-bottom: 17px !important; - border-color: rgba(119, 136, 153, 0.5); border-style: solid; + border-color: rgba(119, 136, 153, 0.5); } dl.method { padding: 3px 3px 3px 5px; margin-bottom: 17px !important; - border-color: rgba(32, 178, 170, 0.5); border-style: solid; + border-color: rgba(32, 178, 170, 0.5); } div.sphinxsidebar { @@ -110,9 +110,9 @@ div.toctree-wrapper.compound > ul > li { padding: 0; } - @media screen and (min-width: 870px) { div.sphinxsidebar { width: 250px; } + } diff --git a/tests/test_files/test_docs_/test_make_alabaster_themingstyle.css b/tests/test_files/test_docs_/test_make_alabaster_theming_style.css similarity index 100% rename from tests/test_files/test_docs_/test_make_alabaster_themingstyle.css rename to tests/test_files/test_docs_/test_make_alabaster_theming_style.css index 21d0c388..e3fe93ce 100644 --- a/tests/test_files/test_docs_/test_make_alabaster_themingstyle.css +++ b/tests/test_files/test_docs_/test_make_alabaster_theming_style.css @@ -8,18 +8,18 @@ html { dl.class { padding: 3px 3px 3px 5px; - margin-top: 7px !important; margin-bottom: 17px !important; - border-color: rgba(240, 128, 128, 0.5); border-style: solid; + margin-top: 7px !important; + border-color: rgba(240, 128, 128, 0.5); } dl.function { padding: 3px 3px 3px 5px; - margin-top: 7px !important; margin-bottom: 17px !important; - border-color: lightskyblue; border-style: solid; + margin-top: 7px !important; + border-color: lightskyblue; } dl.function dt { @@ -29,15 +29,15 @@ dl.function dt { dl.attribute { padding: 3px 3px 3px 5px; margin-bottom: 17px !important; - border-color: rgba(119, 136, 153, 0.5); border-style: solid; + border-color: rgba(119, 136, 153, 0.5); } dl.method { padding: 3px 3px 3px 5px; margin-bottom: 17px !important; - border-color: rgba(32, 178, 170, 0.5); border-style: solid; + border-color: rgba(32, 178, 170, 0.5); } div.sphinxsidebar { @@ -108,9 +108,9 @@ div.toctree-wrapper.compound > ul > li { padding: 0; } - @media screen and (min-width: 870px) { div.sphinxsidebar { width: 250px; } + }