nav-button-mobile.css

Same filename and directory in other branches
  1. 10 core/themes/olivero/css/components/navigation/nav-button-mobile.css
  2. 9 core/themes/olivero/css/components/navigation/nav-button-mobile.css
  3. main 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. .mobile-nav-button {
  12. position: relative;
  13. z-index: 505; /* Appear above mobile nav. */
  14. display: flex;
  15. align-items: center;
  16. align-self: center;
  17. width: var(--sp2);
  18. height: var(--sp2);
  19. margin-inline-start: auto;
  20. margin-inline-end: -0.375rem;
  21. padding-block: 0;
  22. padding-inline-start: 0.375rem;
  23. padding-inline-end: 0.375rem;
  24. cursor: pointer;
  25. border: none;
  26. background: transparent;
  27. appearance: none;
  28. &:focus {
  29. outline: solid 2px var(--color--primary-40);
  30. }
  31. &:active {
  32. color: inherit; /* Override Safari's default UA styles. */
  33. }
  34. @media (min-width: 31.25rem) {
  35. display: inline-flex;
  36. width: auto;
  37. padding-inline-start: var(--sp);
  38. }
  39. }
  40. /* Text that says "menu". */
  41. .mobile-nav-button__label {
  42. position: absolute;
  43. display: block;
  44. overflow: hidden;
  45. clip: rect(1px, 1px, 1px, 1px);
  46. width: 1px;
  47. height: 1px;
  48. word-wrap: normal;
  49. @media (min-width: 31.25rem) {
  50. position: static;
  51. overflow: visible;
  52. clip: auto;
  53. width: auto;
  54. height: auto;
  55. margin-inline-end: 0.75rem;
  56. letter-spacing: 0.05em;
  57. font-size: 0.875rem;
  58. font-weight: 600;
  59. }
  60. }
  61. .mobile-nav-button__icon {
  62. position: relative;
  63. display: block;
  64. width: var(--sp2);
  65. height: 0;
  66. border-top: solid 3px var(--color--primary-50);
  67. &::before,
  68. &::after {
  69. position: absolute;
  70. inset-block-start: 0;
  71. inset-inline-start: 0;
  72. width: 100%;
  73. height: 0;
  74. content: "";
  75. transition: transform 0.2s;
  76. border-top: solid 3px var(--color--primary-50);
  77. }
  78. &::before {
  79. transform: translateY(-0.6875rem);
  80. }
  81. &::after {
  82. transform: translateY(0.3125rem);
  83. }
  84. }
  85. .mobile-nav-button[aria-expanded="true"] .mobile-nav-button__icon {
  86. border-top-color: transparent;
  87. &::before {
  88. transform: translateY(-0.1875rem) rotate(-45deg);
  89. }
  90. &::after {
  91. transform: translateY(-0.1875rem) rotate(45deg);
  92. }
  93. }

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