mirror of https://github.com/zulip/zulip.git
help_pages: Improve anchor highlights.
These changes ensure that only headings targeted by URL fragments are highlighted in full. Div elements will have their immediate first child element highlighted instead (e.g., the first element of an API parameter box).
This commit is contained in:
parent
44ae67d426
commit
0407abc788
|
@ -253,6 +253,16 @@ html {
|
||||||
& .scroll-target {
|
& .scroll-target {
|
||||||
/* Match to where simplebar scrolls */
|
/* Match to where simplebar scrolls */
|
||||||
scroll-margin-top: 20px;
|
scroll-margin-top: 20px;
|
||||||
|
}
|
||||||
|
/* Highlight the headings as well as the first child
|
||||||
|
of any targeted div, as in the API documentation. */
|
||||||
|
& h1.scroll-target,
|
||||||
|
& h2.scroll-target,
|
||||||
|
& h3.scroll-target,
|
||||||
|
& h4.scroll-target,
|
||||||
|
& h5.scroll-target,
|
||||||
|
& h6.scroll-target,
|
||||||
|
& div.scroll-target > :first-child {
|
||||||
/* Increase the highlighted space around the text... */
|
/* Increase the highlighted space around the text... */
|
||||||
padding: 6px 8px;
|
padding: 6px 8px;
|
||||||
border-radius: 7px 7px 0 0;
|
border-radius: 7px 7px 0 0;
|
||||||
|
|
Loading…
Reference in New Issue