diff --git a/assets/scss/custom.scss b/assets/scss/custom.scss index 898b9808..e8eab983 100644 --- a/assets/scss/custom.scss +++ b/assets/scss/custom.scss @@ -165,16 +165,10 @@ footer { } -/* Adjust heading anchors for site header */ -.td-content { - &> h2, - &> h3, - &> h4, - &> h5, - &> h6, - .rendered-data h1 { - scroll-margin-top: 5rem; - } +/* Adjust the scroll margin for everything in the main content, so that + * it doesn't disappear behind the header bar */ +.td-content * { + scroll-margin-top: 5.5rem; } /* Styles for the table of contents */ diff --git a/changelogs/internal/newsfragments/1191.clarification b/changelogs/internal/newsfragments/1191.clarification new file mode 100644 index 00000000..3c4ca5f6 --- /dev/null +++ b/changelogs/internal/newsfragments/1191.clarification @@ -0,0 +1 @@ +Render HTML anchors for object definition tables. diff --git a/layouts/shortcodes/definition.html b/layouts/shortcodes/definition.html index fdb307f7..02f2c6b0 100644 --- a/layouts/shortcodes/definition.html +++ b/layouts/shortcodes/definition.html @@ -30,7 +30,7 @@ {{ $definition = partial "json-schema/resolve-refs" (dict "schema" $definition "path" $path) }} {{ $definition = partial "json-schema/resolve-allof" $definition }} -
+