You are here

nav-button-mobile.css in Drupal 10

Same filename and directory in other branches
  1. 9 core/themes/olivero/css/components/navigation/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. /*
  12. * Media query breakpoints.
  13. * Processed by postcss/postcss-custom-media.
  14. */
  15. /* Navigation related breakpoints */
  16. /* Grid related breakpoints */
  17. /* Grid shifts from 6 to 14 columns. */
  18. /* Width of the entire grid maxes out. */
  19. [dir="ltr"] .mobile-nav-button {
  20. margin-left: auto
  21. }
  22. [dir="rtl"] .mobile-nav-button {
  23. margin-right: auto
  24. }
  25. [dir="ltr"] .mobile-nav-button {
  26. margin-right: -0.375rem
  27. }
  28. [dir="rtl"] .mobile-nav-button {
  29. margin-left: -0.375rem
  30. }
  31. [dir="ltr"] .mobile-nav-button {
  32. padding-left: 0.375rem
  33. }
  34. [dir="rtl"] .mobile-nav-button {
  35. padding-right: 0.375rem
  36. }
  37. [dir="ltr"] .mobile-nav-button {
  38. padding-right: 0.375rem
  39. }
  40. [dir="rtl"] .mobile-nav-button {
  41. padding-left: 0.375rem
  42. }
  43. .mobile-nav-button {
  44. position: relative;
  45. z-index: 505; /* Appear above mobile nav. */
  46. display: flex;
  47. align-items: center;
  48. align-self: center;
  49. width: var(--sp2);
  50. height: var(--sp2);
  51. padding-top: 0;
  52. padding-bottom: 0;
  53. cursor: pointer;
  54. border: none;
  55. background: transparent;
  56. -webkit-appearance: none;
  57. appearance: none
  58. }
  59. .mobile-nav-button:focus {
  60. outline: solid 2px var(--color--primary-40);
  61. }
  62. .mobile-nav-button:active {
  63. color: inherit; /* Override Safari's default UA styles. */
  64. }
  65. @media (min-width: 31.25rem) {
  66. [dir="ltr"] .mobile-nav-button {
  67. padding-left: var(--sp)
  68. }
  69. [dir="rtl"] .mobile-nav-button {
  70. padding-right: var(--sp)
  71. }
  72. .mobile-nav-button {
  73. display: inline-flex;
  74. width: auto
  75. }
  76. }
  77. /* Text that says "menu". */
  78. .mobile-nav-button__label {
  79. position: absolute;
  80. display: block;
  81. overflow: hidden;
  82. clip: rect(1px, 1px, 1px, 1px);
  83. width: 1px;
  84. height: 1px;
  85. word-wrap: normal
  86. }
  87. @media (min-width: 31.25rem) {
  88. [dir="ltr"] .mobile-nav-button__label {
  89. margin-right: 0.75rem
  90. }
  91. [dir="rtl"] .mobile-nav-button__label {
  92. margin-left: 0.75rem
  93. }
  94. .mobile-nav-button__label {
  95. position: static;
  96. overflow: visible;
  97. clip: auto;
  98. width: auto;
  99. height: auto;
  100. letter-spacing: 0.05em;
  101. font-size: 0.875rem;
  102. font-weight: 600
  103. }
  104. }
  105. .mobile-nav-button__icon {
  106. position: relative;
  107. display: block;
  108. width: var(--sp2);
  109. height: 0;
  110. border-top: solid 3px var(--color--primary-50)
  111. }
  112. [dir="ltr"] .mobile-nav-button__icon:before {
  113. left: 0
  114. }
  115. [dir="rtl"] .mobile-nav-button__icon:before {
  116. right: 0
  117. }
  118. .mobile-nav-button__icon:before {
  119. position: absolute;
  120. top: -0.6875rem;
  121. width: 100%;
  122. height: 0;
  123. content: "";
  124. transition: all 0.2s;
  125. border-top: solid 3px var(--color--primary-50);
  126. }
  127. [dir="ltr"] .mobile-nav-button__icon:after {
  128. left: 0
  129. }
  130. [dir="rtl"] .mobile-nav-button__icon:after {
  131. right: 0
  132. }
  133. .mobile-nav-button__icon:after {
  134. position: absolute;
  135. top: auto;
  136. bottom: -0.5rem;
  137. width: 100%;
  138. height: 0;
  139. content: "";
  140. transition: all 0.2s;
  141. border-top: solid 3px var(--color--primary-50);
  142. }
  143. .mobile-nav-button[aria-expanded="true"] .mobile-nav-button__icon {
  144. border-top: 0
  145. }
  146. .mobile-nav-button[aria-expanded="true"] .mobile-nav-button__icon:before {
  147. top: 0;
  148. transform: rotate(-45deg);
  149. }
  150. .mobile-nav-button[aria-expanded="true"] .mobile-nav-button__icon:after {
  151. top: 0;
  152. transform: rotate(45deg);
  153. }