From 0e202eca751eb698f13cf4747de419f6e6672d8a Mon Sep 17 00:00:00 2001 From: Bas Brands Date: Wed, 15 Aug 2018 11:37:21 +0200 Subject: [PATCH] MDL-62528 forum: Fixed vertical position when loading permalinks --- theme/boost/scss/moodle/course.scss | 2 +- theme/boost/scss/moodle/drawer.scss | 9 ++++++--- theme/boost/style/moodle.css | 12 +++++++----- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/theme/boost/scss/moodle/course.scss b/theme/boost/scss/moodle/course.scss index c368d44b6c3..0bc6d4ca78a 100644 --- a/theme/boost/scss/moodle/course.scss +++ b/theme/boost/scss/moodle/course.scss @@ -325,7 +325,7 @@ padding: 0; li.section { - padding-top: $spacer; + margin-top: $spacer; padding-bottom: $spacer; .content { diff --git a/theme/boost/scss/moodle/drawer.scss b/theme/boost/scss/moodle/drawer.scss index 53b90073e66..5226db123b9 100644 --- a/theme/boost/scss/moodle/drawer.scss +++ b/theme/boost/scss/moodle/drawer.scss @@ -6,10 +6,13 @@ $drawer-padding-x: 20px !default; $drawer-padding-y: 20px !default; $drawer-offscreen-gutter: 20px !default; -:target { - padding-top: ($fixed-header-y + 30px) !important; /* stylelint-disable declaration-no-important */ - margin-top: -$fixed-header-y !important; /* negative fixed header height */ +:target::before { + content: " "; + display: block; + height: ($fixed-header-y + 10px); /* fixed header height*/ + margin-top: -($fixed-header-y + 10px); /* negative fixed header height */ } + .pagelayout-embedded :target { padding-top: initial; margin-top: initial; diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 84ffc1210ea..8ec1c5e150b 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -11855,7 +11855,7 @@ table.calendartable caption { padding: 0; } .course-content ul.topics li.section, .course-content ul.weeks li.section { - padding-top: 1rem; + margin-top: 1rem; padding-bottom: 1rem; } .course-content ul.topics li.section .content, .course-content ul.weeks li.section .content { @@ -12495,10 +12495,12 @@ span.editinstructions { font-size: 32px; } /* Anchor link offset fix. This makes hash links scroll 60px down to account for the fixed header. */ -:target { - padding-top: 80px !important; - /* stylelint-disable declaration-no-important */ - margin-top: -50px !important; +:target::before { + content: " "; + display: block; + height: 60px; + /* fixed header height*/ + margin-top: -60px; /* negative fixed header height */ } .pagelayout-embedded :target {