MDL-71152 theme_boost: Use 'scroll-margin-top' for anchor links

Current anchor link offset fix is not working with 'display:flex' elements
This commit is contained in:
Mikel Martín 2021-03-19 15:11:50 +01:00
parent 8453fe0ddb
commit f874652ad2
4 changed files with 6 additions and 29 deletions

View File

@ -15,7 +15,3 @@
#page-admin-tool-task-scheduledtasks .task-clearfaildelay {
font-size: 0.75em;
}
#page-admin-tool-task-scheduledtasks :target {
scroll-margin-top: 60px;
}

View File

@ -6,13 +6,8 @@ $drawer-padding-x: 20px !default;
$drawer-padding-y: 20px !default;
$drawer-offscreen-gutter: 20px !default;
:target::before {
content: " ";
display: block;
height: ($fixed-header-y + 10px); /* fixed header height*/
margin-top: -($fixed-header-y + 10px); /* negative fixed header height */
width: 1px;
pointer-events: none;
:target {
scroll-margin-top: $fixed-header-y + 10px;
}
.pagelayout-embedded :target {

View File

@ -14200,15 +14200,8 @@ span.editinstructions {
font-size: 100%; }
/* Anchor link offset fix. This makes hash links scroll 60px down to account for the fixed header. */
:target::before {
content: " ";
display: block;
height: 60px;
/* fixed header height*/
margin-top: -60px;
/* negative fixed header height */
width: 1px;
pointer-events: none; }
:target {
scroll-margin-top: 60px; }
.pagelayout-embedded :target {
padding-top: initial;

View File

@ -14423,15 +14423,8 @@ span.editinstructions {
font-size: 100%; }
/* Anchor link offset fix. This makes hash links scroll 60px down to account for the fixed header. */
:target::before {
content: " ";
display: block;
height: 60px;
/* fixed header height*/
margin-top: -60px;
/* negative fixed header height */
width: 1px;
pointer-events: none; }
:target {
scroll-margin-top: 60px; }
.pagelayout-embedded :target {
padding-top: initial;