mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-05-23 02:35:49 +00:00
Use scroll-margin-top instead of pseudo hack
This commit is contained in:
parent
e45c92f1d5
commit
61b86c1e86
2 changed files with 4 additions and 24 deletions
|
|
@ -167,11 +167,5 @@
|
||||||
}
|
}
|
||||||
anchors.add('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5')
|
anchors.add('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5')
|
||||||
|
|
||||||
// Wrap inner
|
|
||||||
makeArray(document.querySelectorAll('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5'))
|
|
||||||
.forEach(function (hEl) {
|
|
||||||
hEl.innerHTML = '<span class="bd-content-title">' + hEl.innerHTML + '</span>'
|
|
||||||
})
|
|
||||||
|
|
||||||
bsCustomFileInput.init()
|
bsCustomFileInput.init()
|
||||||
})()
|
})()
|
||||||
|
|
|
||||||
|
|
@ -5,20 +5,11 @@
|
||||||
.bd-content {
|
.bd-content {
|
||||||
order: 1;
|
order: 1;
|
||||||
|
|
||||||
// Hack the sticky header
|
// Offset for the sticky header
|
||||||
// stylelint-disable selector-no-qualifying-type
|
> * {
|
||||||
> h2[id],
|
@include media-breakpoint-up(md) {
|
||||||
> h3[id],
|
scroll-margin-top: 4rem;
|
||||||
> h4[id] {
|
|
||||||
pointer-events: none;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
display: block;
|
|
||||||
height: 6rem;
|
|
||||||
margin-top: -6rem;
|
|
||||||
content: "";
|
|
||||||
}
|
}
|
||||||
// stylelint-enable selector-no-qualifying-type
|
|
||||||
}
|
}
|
||||||
|
|
||||||
> h2:not(:first-child) {
|
> h2:not(:first-child) {
|
||||||
|
|
@ -66,11 +57,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bd-content-title {
|
|
||||||
display: block;
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bd-title {
|
.bd-title {
|
||||||
@include font-size(3rem);
|
@include font-size(3rem);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue