Render HTML anchors for definition blocks (#1191)
It's handy to be able to link to these.
This commit is contained in:
parent
569e139ac5
commit
dc4fd9bdd6
3 changed files with 6 additions and 11 deletions
|
@ -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 */
|
||||
|
|
1
changelogs/internal/newsfragments/1191.clarification
Normal file
1
changelogs/internal/newsfragments/1191.clarification
Normal file
|
@ -0,0 +1 @@
|
|||
Render HTML anchors for object definition tables.
|
|
@ -30,7 +30,7 @@
|
|||
{{ $definition = partial "json-schema/resolve-refs" (dict "schema" $definition "path" $path) }}
|
||||
{{ $definition = partial "json-schema/resolve-allof" $definition }}
|
||||
|
||||
<section class="rendered-data definition">
|
||||
<section class="rendered-data definition" id="{{ anchorize $definition.title }}">
|
||||
|
||||
<details {{ if not $compact }}open{{ end }}>
|
||||
<summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue