From 1e022f24b7feda3905d528aef68748da28ae96d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=B3pez=20Barr=C3=B3n?= Date: Sat, 21 Dec 2024 15:23:32 +1100 Subject: [PATCH] margin updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian López Barrón --- docs/source/_static/custom.css | 26 ++++++++++++++++++++++++++ docs/source/conf.py | 6 ++++-- grill/cook/__init__.py | 2 +- grill/usd/__init__.py | 13 +++---------- 4 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 docs/source/_static/custom.css diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css new file mode 100644 index 00000000..2eac2a0b --- /dev/null +++ b/docs/source/_static/custom.css @@ -0,0 +1,26 @@ +/* Default state (with sidebar visible) */ +.sy-main { + width: calc(100% - 20rem); /* Adjust width with sidebar */ + max-width: none; /* Prevent it from exceeding the container's size */ + box-sizing: border-box; /* Ensure padding/margins don’t add to total width */ +} + +/* Responsive state (when sidebar disappears) */ +@media (max-width: 768px) { /* Adjust breakpoint as needed */ + .sy-main { + width: 100%; /* Use full width when sidebar is hidden */ + max-width: none; /* Remove max-width limit */ + } +} + +.sy-rside { + width: 0; /* Keep the sidebar offset */ + max-width: 0; /* Allow the element to fill the remaining space */ +} +/* Take out pointless vertical whitespace in the signatures. */ +/* https://github.com/readthedocs/sphinx_rtd_theme/issues/1529#issuecomment-1918561608 */ +.sig dl { + margin-bottom: 0; + margin-top: 0; + margin-left: 2em; +} diff --git a/docs/source/conf.py b/docs/source/conf.py index 61c044a1..6bf2bd67 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -69,7 +69,7 @@ always_document_param_types = True autodoc_member_order = 'groupwise' -maximum_signature_line_length = 140 +maximum_signature_line_length = 150 inheritance_graph_attrs = dict(rankdir="TB", bgcolor='transparent') inheritance_node_attrs = dict( @@ -148,7 +148,9 @@ # 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_css_files = [ + 'custom.css', +] # -- Options for HTMLHelp output ------------------------------------------ diff --git a/grill/cook/__init__.py b/grill/cook/__init__.py index ac6ecee3..52e9edb0 100644 --- a/grill/cook/__init__.py +++ b/grill/cook/__init__.py @@ -4,7 +4,7 @@ :class:`contextvars.ContextVar` for the global asset repository location. - It's value must always be set to a :class:`pathlib.Path`. + Its value must always be set to a :class:`pathlib.Path`. .. attention:: By default, no value has been set. Ensure to set it before performing any creation operation. diff --git a/grill/usd/__init__.py b/grill/usd/__init__.py index 72967d16..2ef2bb76 100644 --- a/grill/usd/__init__.py +++ b/grill/usd/__init__.py @@ -87,15 +87,11 @@ def iprims(stage: Usd.Stage, root_paths: abc.Iterable[Sdf.Path] = tuple(), prune @functools.singledispatch def edit_context(prim: Usd.Prim, /, query_filter: Usd.PrimCompositionQuery.Filter, arc_predicate: abc.Callable[[Usd.CompositionArc], bool]) -> Usd.EditContext: - """Composition arcs target layer stacks. These functions help create EditTargets for the first matching node's root layer stack from prim's composition arcs. + """:ref:`glossary:composition arcs` target :ref:`LayerStacks `. These functions provide an :ref:`glossary:edittarget` for the first :usdcpp:`arc ` in the :ref:`Prims `'s :usdcpp:`composition ` that returns ``True`` for the given ``arc_predicate``. - This allows for "chained" context switching while preserving the same stage objects. - - Operate on a :usdclass:`prim` and return an :usdclass:`EditContext `. + Overloaded methods allow for a direct search targetting Payloads, References, Specializes, Inherits and VariantSets. - Refer to the :ref:`glossary:specifier` ins the documentation. - Refer to the :ref:`Specifier ` in the documentation. - Refer to the :ref:`Stage ` in the documentation. + This allows for "chained" context switching while preserving the same stage objects. .. tip:: @@ -217,9 +213,6 @@ def Sphere "child" ( } } - Returns: - :usdclass:`EditContext ` - """ # https://blogs.mathworks.com/developer/2015/03/31/dont-get-in-too-deep/ # with write.context(prim, dict(kingdom="assets")):