mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-31 09:05:47 +02:00
Use scroll-margin-top
instead of pseudo hack
This commit is contained in:
committed by
XhmikosR
parent
e45c92f1d5
commit
61b86c1e86
@@ -5,20 +5,11 @@
|
||||
.bd-content {
|
||||
order: 1;
|
||||
|
||||
// Hack the sticky header
|
||||
// stylelint-disable selector-no-qualifying-type
|
||||
> h2[id],
|
||||
> h3[id],
|
||||
> h4[id] {
|
||||
pointer-events: none;
|
||||
|
||||
&::before {
|
||||
display: block;
|
||||
height: 6rem;
|
||||
margin-top: -6rem;
|
||||
content: "";
|
||||
// Offset for the sticky header
|
||||
> * {
|
||||
@include media-breakpoint-up(md) {
|
||||
scroll-margin-top: 4rem;
|
||||
}
|
||||
// stylelint-enable selector-no-qualifying-type
|
||||
}
|
||||
|
||||
> h2:not(:first-child) {
|
||||
@@ -66,11 +57,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.bd-content-title {
|
||||
display: block;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.bd-title {
|
||||
@include font-size(3rem);
|
||||
}
|
||||
|
Reference in New Issue
Block a user