-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I noticed that your HTML anchors may be obscured (e.g., we can not see the headline/heading and part of the link to a given installer or archive package).
Some time ago, the following was added to CSS:
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/scroll-margin-top
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/scroll-padding-top
For legacy can be used :target:
body :target {
padding-top: 56px
}
@supports (scroll-margin-top: 0) {
body :target {
padding-top: unset;
scroll-margin-top: 56px
}
}Unfortunately, I don't know if it's possible to detect that someone has a larger header in CSS itself, but off the top of my head, you could add a negation in the media for high contrast (assuming that someone will probably increase the font size then):
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-reduced-motion
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-contrast
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/forced-colors
@media
(prefers-reduced-motion: no-preference) and
(prefers-contrast: no-preference) and
(forced-colors: none) {
body :target {
padding-top: 56px
}
@supports (scroll-margin-top: 0) {
body :target {
padding-top: unset;
scroll-margin-top: 56px
}
}
}