Skip to content

Commit 9b673fa

Browse files
authored
Merge pull request #326 from BeAPI/fix/admin-bar-mobile
fix admin bar mobile not sticky
2 parents 833eca4 + 9f1d0e8 commit 9b673fa

File tree

5 files changed

+24
-15
lines changed

5 files changed

+24
-15
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@
7070
* Global breakpoints
7171
*/
7272

73+
@include breakpoints(s, max) {
74+
/*
75+
* Admin bar become not sticky
76+
*/
77+
&:not(.scroll-top) {
78+
.admin-bar {
79+
--wp-admin-bar-height: 0rem;
80+
}
81+
}
82+
}
83+
7384
@include breakpoints(admin-bar) {
7485
/*
7586
* Admin bar

src/scss/04-utilities/_aria.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[aria-expanded="false"] {
2-
.aria-expanded-true-text {
3-
display: none !important;
4-
}
2+
.aria-expanded-true-text {
3+
display: none !important;
4+
}
55
}
66

77
[aria-expanded="true"] {
8-
.aria-expanded-false-text {
9-
display: none !important;
10-
}
11-
}
8+
.aria-expanded-false-text {
9+
display: none !important;
10+
}
11+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#wpadminbar {
2+
@include breakpoints(sm, max) {
3+
overflow: scroll;
4+
}
5+
}

src/scss/04-utilities/utilities.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@import "./wp-admin-bar";
12
@import "./focus";
23
@import "./lazyload";
34
@import "./seo";

src/scss/08-template-parts/_header.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,6 @@
205205
}
206206
}
207207

208-
@include breakpoints(s, max) {
209-
.scroll-up &__inner,
210-
.scroll-down &__inner,
211-
.scroll-bottom &__inner {
212-
top: 0;
213-
}
214-
}
215-
216208
@include breakpoints(sm) {
217209
&__menu {
218210
#{$el}__logo-link {

0 commit comments

Comments
 (0)