Accessibility fixes
[wolnelektury.git] / src / wolnelektury / static / 2022 / styles / layout / _navigation.scss
index e2ff386..9e3aafc 100644 (file)
@@ -3,6 +3,8 @@ body {
 }
 
 .l-navigation {
+  --focus-ring: #fff;
+    
   max-width: 100%;
   margin: 0 auto;
   background-color: #083F4D;
@@ -22,6 +24,7 @@ body {
   }
   
   .l-container {
+      position: relative;
     display: flex;
     align-items: center;
     justify-content: space-between;
@@ -40,14 +43,8 @@ body {
 
     .l-navigation__menu {
       opacity: 1;
-      pointer-events: all;
-    }
-
-    .c-lang {
-      opacity: 1;
-      .c-lang__button {
-        pointer-events: all;
-      }
+      visibility: visible;
+      pointer-events: auto;
     }
   }
 }
@@ -86,20 +83,9 @@ body {
   background: 0;
   padding: 0;
   margin: 0;
-  outline: 0;
   position: relative;
 }
 
-.is-open {
-    .l-navigation__logo {
-        z-index: $master-layer + 1;
-    }
-    .l-navigation__button {
-        z-index: $master-layer + 1;
-    }
-}
-
-
 .l-naviagion__search {
     width: 60%;
     max-width: 580px;
@@ -122,7 +108,6 @@ body {
     border-radius: 52px;
     width: 100%;
     max-width: 580px;
-    outline: 0;
 
     @include rwd($break-menu) {
         font-size: 18px;
@@ -137,9 +122,10 @@ body {
     position: relative;
     height: 44px;
 
-  .icon-liked {
+  .user-liked {
     color: #85C7CC;
     font-size: 30px;
+    line-height: 30px;
     margin-right: 25px;
   }
 
@@ -160,10 +146,22 @@ body {
               color: white;
           }
       }
+
+      .menubar-donate {
+         color: #fff;
+         background: #c92834;
+         padding: 9px 20px 11px;
+         font-weight: 600;
+         margin-right: 20px;
+         border-radius: 15px;
+      }
   }
 
     .user {
         margin-right: 25px;
+        background: none;
+        border: none;
+        padding: 0;
     }
 
 }
@@ -215,38 +213,52 @@ body {
   }
 }
 
-.l-change-pop__close {
-  border: 0;
-  background: transparent;
-  color: #333333;
-  outline: 0;
-  position: absolute;
-  right: 26px;
-  top: 0;
-  bottom: 0;
-  margin: auto;
-  cursor: pointer;
-}
-
 .l-navigation__menu {
-  position: fixed;
-  top: 0; left: 0;
-  width: 100%; height: 100%;
-  background-color: #083F4D;
-  z-index: $master-layer;
-  padding-top: 50px;
-  opacity: 0;
-  pointer-events: none;
-  transition: opacity 350ms $ease-out;
-
-  @include rwd($break-menu) {
-      padding-top: 93px;
-  }
-  
-  .l-container {
-    display: flex;
+    margin: 0;
+    padding: 0;
+    border: 0;
+    max-width: none;
+    max-height: none;
+    width: 100%;
+    height: 100%;
     flex-direction: column;
-  }
+    background-color: #083F4D;
+    opacity: 0;
+    transition: opacity 350ms $ease-out;
+    // Gdy
+    // https://caniuse.com/wf-display-animation, https://caniuse.com/wf-overlay
+    //   display 350ms allow-discrete,
+    //   overlay 350ms allow-discrete;
+
+    &[open] {
+        display: flex;
+        opacity: 1;
+    }
+    &:not([open]) {
+        pointer-events: none;
+    }
+    // https://caniuse.com/wf-display-animation, https://caniuse.com/wf-overlay
+    &.is-closing {
+        opacity: 0;
+        pointer-events: none;
+    }
+  
+    .l-navigation__menu__top {
+        padding: 3px 0;
+        @include rwd($break-menu) {
+            padding: 12px 0;
+        }
+    }
+    .scrollable {
+        height: 100%;
+        overflow-y: auto;
+        padding-bottom: 30px;
+
+        .l-container {
+            display: flex;
+            flex-direction: column;
+        }
+    }
 
   .l-navigation__user-bar {
       width: 100%;
@@ -275,10 +287,30 @@ body {
                   font-size: 30px;
               }
           }
+          .c-lang {
+              display: block;
+              left: 16px;
+          }
+
+         .menubar-donate {
+             display: none;
+         }
       }
   }
 }
 
+body:has(dialog[open]) {
+    overflow: hidden;
+}
+
+@starting-style {
+    .l-navigation__menu[open] {
+        opacity: 0;
+    }
+}
+@media (prefers-reduced-motion: reduce) {
+  .l-navigation__menu { transition: none; }
+}
 
 .l-navigation__menu__blocks {
     position: relative;
@@ -347,6 +379,12 @@ body {
         &:hover {
           text-decoration: underline;
         }
+
+        em {
+            font-style: normal;
+            color: #FFA500;
+            font-weight: 600;
+        }
       }
 
       hr {
@@ -378,6 +416,9 @@ body {
     display: flex;
     flex-direction: column;
     justify-content: space-between;
+    @include rwd($break-menu) {
+        width: 60%;
+    }
     
   p {
     color: $color-white;
@@ -483,11 +524,14 @@ body {
 
   p {
     margin: 0;
-    width: 427px;
     font-weight: $regular;
     @include font-size(15px);
     line-height: 130%;
     color: #808080;
+
+      @include rwd($break-menu) {
+          width: 427px;
+      }
   }
 }