diff --git a/admin/tool/task/styles.css b/admin/tool/task/styles.css index 7f37541c7ec..f297fd6afaf 100644 --- a/admin/tool/task/styles.css +++ b/admin/tool/task/styles.css @@ -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; -} diff --git a/theme/boost/scss/moodle/drawer.scss b/theme/boost/scss/moodle/drawer.scss index 365fad85ce8..42ec734e122 100644 --- a/theme/boost/scss/moodle/drawer.scss +++ b/theme/boost/scss/moodle/drawer.scss @@ -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 { diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 396c790d630..3988c10cd3e 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -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; diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index c0337ce9daa..32b22ef6659 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -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;