Skip to content

Commit 3051502

Browse files
committed
fix cr
1 parent ba4bd7d commit 3051502

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

themes/vue/source/css/_settings.styl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ $info = #1C90F3
1919

2020
$radius = 2px
2121
$content-padding-top = 30px
22+
23+
// header settings
2224
$header-inner-height = 41px
2325
$heading-padding-vertical = 10px
2426
$header-height = $header-inner-height + $heading-padding-vertical * 2
2527
$mobile-header-height = 40px
28+
// prevent headers from being covered by the top nav upon navigation
2629
$heading-link-padding-top = $header-height + $content-padding-top
2730
$mobile-heading-link-padding-top = $mobile-header-height + $content-padding-top
2831
$h2-margin-top = 45px

themes/vue/source/js/common.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,9 @@
337337
var wrapper = link.querySelector('a')
338338
wrapper.setAttribute('data-scroll', '')
339339

340+
// transform DOM structure from
341+
// `<h2><a></a>Header</a>` to <h2><a>Header</a></h2>`
342+
// to make the link clickable
340343
var nodes = link.childNodes
341344
for (var i = 0; i < nodes.length; i++) {
342345
var node = nodes[i]

0 commit comments

Comments
 (0)