help-beta: Highlight heading if it is the target.

Fixes #35119.
In the old help center, our css used to target each heading tag, h1, h2,
etc. individually. We don't need to do that anymore since the first
child of .sl-heading-wrapper is the heading element in starlight.

The rounded border on the top left and top right has been removed since
it did not look good with the default starlight theme.
This commit is contained in:
Shubham Padia
2025-07-14 12:46:27 +00:00
committed by Tim Abbott
parent 421b6e9787
commit 183b79b1ab

View File

@@ -65,4 +65,15 @@
li > ol { li > ol {
margin-top: 0.25rem; margin-top: 0.25rem;
} }
& .sl-heading-wrapper:has(> :first-child:target) {
/* Increase the highlighted space around the text... */
/* We are trying to recreate `padding: 6px 0 6px 8px` below
using box-shadow since we don't want padding to affect the
layout. A spread of 6px will make sure of the 6px part of
the padding, and -2px will ensure a padding of 8px is
recreated on the left side. */
box-shadow: -2px 0 0 6px var(--sl-color-accent-low);
background-color: var(--sl-color-accent-low);
}
} }