File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 <?php wp_body_open (); ?>
2828 <nav class="skip-links skip-links--hidden" aria-label="<?php esc_attr_e ( 'Fast access links ' , 'beapi-frontend-framework ' ); ?> ">
2929 <ul>
30- <li>
30+ <li class="display-desktop-only" >
3131 <a href="#menu"><?php esc_html_e ( 'Go to main navigation menu ' , 'beapi-frontend-framework ' ); ?> </a>
3232 </li>
33+ <li class="display-mobile-only">
34+ <a href="#menu-toggle"><?php esc_html_e ( 'Go to main navigation menu ' , 'beapi-frontend-framework ' ); ?> </a>
35+ </li>
3336 <li>
3437 <a href="#content"><?php esc_html_e ( 'Go to main content ' , 'beapi-frontend-framework ' ); ?> </a>
3538 </li>
4649 <span class="sr-only"><?php echo esc_html ( get_bloginfo ( 'name ' ) ); ?> </span>
4750 </a>
4851 <?php if ( has_nav_menu ( 'menu-main ' ) ) : ?>
49- <button class="header__menu-toggle" aria-expanded="false" aria-controls="menu">
52+ <button id="menu-toggle" class="header__menu-toggle" aria-expanded="false" aria-controls="menu">
5053 <span></span>
5154 <span class="sr-only aria-expanded-false-text"><?php esc_html_e ( 'Open the menu ' , 'beapi-frontend-framework ' ); ?> </span>
5255 <span class="sr-only aria-expanded-true-text"><?php esc_html_e ( 'Close the menu ' , 'beapi-frontend-framework ' ); ?> </span>
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ $breakpoints: (
5353 admin-bar : 784 , // admin bar height change
5454 m : 960 ,
5555 md : 1080 ,
56+ mobile-to-desktop-nav : 1200 ,
5657 mdl : 1279 , // Do not use 1280px, it causes a bug under Window Edge with a device pixel ratio higher than 1
5758 l : 1440 ,
5859);
Original file line number Diff line number Diff line change 1+ @use " ../02-tools/m-breakpoint" as * ;
2+ @use " ../02-tools/m-style-only" as * ;
3+
4+ /* *
5+ * Display utilities
6+ *
7+ * Utility classes for showing/hiding elements based on the mobile-to-desktop-nav breakpoint.
8+ * Used primarily for skip links and navigation-related elements.
9+ */
10+
11+ // Visible only on mobile (below mobile-to-desktop-nav breakpoint)
12+ .display-mobile-only {
13+ @include breakpoints (mobile- to- desktop- nav) {
14+ @include style-only {
15+ display : none !important ;
16+ }
17+ }
18+ }
19+
20+ // Visible only on desktop (at or above mobile-to-desktop-nav breakpoint)
21+ .display-desktop-only {
22+ @include breakpoints (mobile- to- desktop- nav, max ) {
23+ @include style-only {
24+ display : none !important ;
25+ }
26+ }
27+ }
Original file line number Diff line number Diff line change 180180 }
181181 }
182182
183- @include breakpoints (mdl , max ) {
183+ @include breakpoints (mobile - to - desktop - nav , max ) {
184184 & __menu {
185185 position : absolute ;
186186 top : 0 ;
229229 }
230230 }
231231
232- @include breakpoints (sm, mdl ) {
232+ @include breakpoints (sm, mobile - to - desktop - nav ) {
233233 #{$el } __menu {
234234 right : 0 ;
235235 left : auto ;
248248 }
249249 }
250250
251- @include breakpoints (mdl ) {
251+ @include breakpoints (mobile - to - desktop - nav ) {
252252 .container {
253253 display : flex ;
254254 align-items : flex-start ;
You can’t perform that action at this time.
0 commit comments