nav-button-mobile.css

Nav Button Mobile.

File

core/themes/olivero/css/components/navigation/nav-button-mobile.css

View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Nav Button Mobile.
  10. */
  11. [dir="ltr"] .mobile-nav-button {
  12. margin-left: auto;
  13. }
  14. [dir="rtl"] .mobile-nav-button {
  15. margin-right: auto;
  16. }
  17. [dir="ltr"] .mobile-nav-button {
  18. margin-right: -0.375rem;
  19. }
  20. [dir="rtl"] .mobile-nav-button {
  21. margin-left: -0.375rem;
  22. }
  23. [dir="ltr"] .mobile-nav-button {
  24. padding-left: 0.375rem;
  25. }
  26. [dir="rtl"] .mobile-nav-button {
  27. padding-right: 0.375rem;
  28. }
  29. [dir="ltr"] .mobile-nav-button {
  30. padding-right: 0.375rem;
  31. }
  32. [dir="rtl"] .mobile-nav-button {
  33. padding-left: 0.375rem;
  34. }
  35. .mobile-nav-button {
  36. position: relative;
  37. z-index: 505; /* Appear above mobile nav. */
  38. display: flex;
  39. align-items: center;
  40. -ms-grid-row-align: center;
  41. align-self: center;
  42. width: 2.25rem;
  43. height: 2.25rem;
  44. padding-top: 0;
  45. padding-bottom: 0;
  46. cursor: pointer;
  47. border: none;
  48. background: transparent;
  49. -webkit-appearance: none;
  50. appearance: none;
  51. }
  52. .mobile-nav-button:focus {
  53. outline: solid 2px #0d77b5;
  54. }
  55. .mobile-nav-button:active {
  56. color: inherit; /* Override Safari's default UA styles. */
  57. }
  58. @media (min-width: 31.25rem) {
  59. [dir="ltr"] .mobile-nav-button {
  60. padding-left: 1.125rem;
  61. }
  62. [dir="rtl"] .mobile-nav-button {
  63. padding-right: 1.125rem;
  64. }
  65. .mobile-nav-button {
  66. display: inline-flex;
  67. width: auto;
  68. }
  69. }
  70. /* Text that says "menu". */
  71. .mobile-nav-button__label {
  72. position: absolute;
  73. display: block;
  74. overflow: hidden;
  75. clip: rect(1px, 1px, 1px, 1px);
  76. width: 1px;
  77. height: 1px;
  78. word-wrap: normal;
  79. }
  80. @media (min-width: 31.25rem) {
  81. [dir="ltr"] .mobile-nav-button__label {
  82. margin-right: 0.75rem;
  83. }
  84. [dir="rtl"] .mobile-nav-button__label {
  85. margin-left: 0.75rem;
  86. }
  87. .mobile-nav-button__label {
  88. position: static;
  89. overflow: visible;
  90. clip: auto;
  91. width: auto;
  92. height: auto;
  93. letter-spacing: 0.05em;
  94. font-size: 0.875rem;
  95. font-weight: 600;
  96. }
  97. }
  98. .mobile-nav-button__icon {
  99. position: relative;
  100. display: block;
  101. width: 2.25rem;
  102. height: 0;
  103. border-top: solid 3px #2494db;
  104. }
  105. [dir="ltr"] .mobile-nav-button__icon:before {
  106. left: 0;
  107. }
  108. [dir="rtl"] .mobile-nav-button__icon:before {
  109. right: 0;
  110. }
  111. .mobile-nav-button__icon:before {
  112. position: absolute;
  113. top: -0.6875rem;
  114. width: 100%;
  115. height: 0;
  116. content: "";
  117. transition: all 0.2s;
  118. border-top: solid 3px #2494db;
  119. }
  120. [dir="ltr"] .mobile-nav-button__icon:after {
  121. left: 0;
  122. }
  123. [dir="rtl"] .mobile-nav-button__icon:after {
  124. right: 0;
  125. }
  126. .mobile-nav-button__icon:after {
  127. position: absolute;
  128. top: auto;
  129. bottom: -0.5rem;
  130. width: 100%;
  131. height: 0;
  132. content: "";
  133. transition: all 0.2s;
  134. border-top: solid 3px #2494db;
  135. }
  136. .mobile-nav-button[aria-expanded="true"] .mobile-nav-button__icon {
  137. border-top: 0;
  138. }
  139. .mobile-nav-button[aria-expanded="true"] .mobile-nav-button__icon:before {
  140. top: 0;
  141. transform: rotate(-45deg);
  142. }
  143. .mobile-nav-button[aria-expanded="true"] .mobile-nav-button__icon:after {
  144. top: 0;
  145. transform: rotate(45deg);
  146. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.