Skip to content

Commit 0022853

Browse files
authored
Merge pull request #364 from BeAPI/feature/improve-skip-links
feat (skip-links): set top value with --wp-admin--admin-bar--height
2 parents 5da5ab5 + 645a747 commit 0022853

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

src/scss/03-base/_variables-css.scss

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@
4141
/*
4242
* Admin bar
4343
*/
44-
--wp-admin-bar-height: 0rem;
45-
46-
.admin-bar {
47-
--wp-admin-bar-height: 46px;
48-
}
44+
--wp-admin-bar-height: var(--wp-admin--admin-bar--height, 0rem);
4945

5046
/*
5147
* Alignments breakpoints
@@ -76,20 +72,11 @@
7672
*/
7773
&:not(.scroll-top) {
7874
.admin-bar {
79-
--wp-admin-bar-height: 0rem;
75+
--wp-admin-bar-height: 0px;
8076
}
8177
}
8278
}
8379

84-
@include breakpoints(admin-bar) {
85-
/*
86-
* Admin bar
87-
*/
88-
.admin-bar {
89-
--wp-admin-bar-height: 32px;
90-
}
91-
}
92-
9380
@include breakpoints(md) {
9481
/*
9582
* Spacing

src/scss/05-components/_skip-links.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.skip-links {
22
position: absolute;
3-
top: 0;
3+
top: var(--wp-admin-bar-height);
44
left: 0;
55
z-index: 10;
66
display: flex;

0 commit comments

Comments
 (0)