Skip to content

Commit 8a81b6a

Browse files
authored
[polaris.shopify.com] Fixed anchor link scroll margin (#8915)
Top bar was overlaying anchor links (we should also make these easily shareable) Thanks to @BPScott for the 👀 and suggestion ![image](https://user-images.githubusercontent.com/6844391/231194171-58c74d58-b453-4f0e-be27-e966d5d07a9e.png)
1 parent 7021852 commit 8a81b6a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/nice-items-carry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'polaris.shopify.com': patch
3+
---
4+
5+
Added scroll-margin-top to anchor links to prevent top bar overlay

polaris.shopify.com/src/styles/globals.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@ button {
283283
}
284284
}
285285

286+
[id] {
287+
scroll-margin-top: var(--header-height);
288+
}
289+
286290
.sr-only {
287291
position: absolute;
288292
width: 1px;

0 commit comments

Comments
 (0)