Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ce8a15a

Browse files
Revert "Fix header link (vuejs#1263)"
This reverts commit b73f126.
1 parent a749cd7 commit ce8a15a

File tree

3 files changed

+9
-22
lines changed

3 files changed

+9
-22
lines changed

‎themes/vue/source/css/_settings.styl‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,11 @@ $info = #1C90F3
1919

2020
$radius = 2px
2121
$content-padding-top = 30px
22-
23-
// header settings
2422
$header-inner-height = 41px
2523
$heading-padding-vertical = 10px
2624
$header-height = $header-inner-height + $heading-padding-vertical * 2
2725
$mobile-header-height = 40px
28-
// prevent headers from being covered by the top nav upon navigation
29-
$heading-link-padding-top = $header-height + $content-padding-top
30-
$mobile-heading-link-padding-top = $mobile-header-height + $content-padding-top
26+
$heading-link-padding-top = $content-padding-top
27+
$mobile-heading-link-padding-top = $content-padding-top
3128
$h2-margin-top = 45px
3229
$h3-margin-top = 52px

‎themes/vue/source/css/page.styl‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@
5252
h1
5353
margin: 0 0 1em
5454
h2, h3
55-
pointer-events: none
56-
a
57-
pointer-events: auto
58-
color: $dark
5955
&:before
6056
content: ""
6157
display: block
@@ -66,9 +62,11 @@
6662
margin: $h2-margin-top 0 .8em
6763
padding-bottom: .7em
6864
border-bottom: 1px solid $border
65+
z-index: -1
6966
h3
7067
margin: $h3-margin-top 0 1.2em
7168
position: relative
69+
z-index: -1
7270
&:after
7371
content: "#"
7472
color: $green

‎themes/vue/source/js/common.js‎

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(function () {
2+
23
initMobileMenu()
34
if (PAGE_TYPE) {
45
initVersionSelect()
@@ -25,7 +26,7 @@
2526
})
2627
}
2728

28-
function createSourceSearchPath(query) {
29+
function createSourceSearchPath(query) {
2930
query = query
3031
.replace(/\([^\)]*?\)/g, '')
3132
.replace(/(Vue\.)(\w+)/g, '1ドル2ドル" OR "2ドル')
@@ -250,7 +251,7 @@
250251
}
251252
}
252253
if (last)
253-
setActive(last.id, !hoveredOverSidebar)
254+
setActive(last.id, !hoveredOverSidebar)
254255
}
255256

256257
function makeLink (h) {
@@ -336,17 +337,8 @@
336337
function makeHeaderClickable (link) {
337338
var wrapper = link.querySelector('a')
338339
wrapper.setAttribute('data-scroll', '')
339-
340-
// transform DOM structure from
341-
// `<h2><a></a>Header</a>` to <h2><a>Header</a></h2>`
342-
// to make the link clickable
343-
var nodes = link.childNodes
344-
for (var i = 0; i < nodes.length; i++) {
345-
var node = nodes[i]
346-
if (node !== wrapper) {
347-
wrapper.appendChild(node)
348-
}
349-
}
340+
link.parentNode.insertBefore(wrapper, link)
341+
wrapper.appendChild(link)
350342
}
351343
}
352344
})()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /