wide-nav-expand.css

Same filename and directory in other branches
  1. 10 core/themes/olivero/css/components/navigation/wide-nav-expand.css
  2. 9 core/themes/olivero/css/components/navigation/wide-nav-expand.css

Button which expands the navigation at wide viewport widths.

File

core/themes/olivero/css/components/navigation/wide-nav-expand.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. * Button which expands the navigation at wide viewport widths.
  10. */
  11. .wide-nav-expand {
  12. display: none;
  13. @media (min-width: 75rem) {
  14. display: flex;
  15. visibility: hidden;
  16. flex-shrink: 0;
  17. align-items: center;
  18. justify-content: center;
  19. width: var(--content-left);
  20. height: var(--sp6);
  21. cursor: pointer;
  22. pointer-events: auto;
  23. color: var(--color--white);
  24. border: 0;
  25. background-color: var(--color--primary-50);
  26. &:focus {
  27. outline: solid 2px currentColor;
  28. outline-offset: -4px;
  29. }
  30. }
  31. }
  32. body:not(.is-always-mobile-nav) .is-fixed .wide-nav-expand {
  33. @media (min-width: 75rem) {
  34. visibility: visible;
  35. }
  36. }
  37. body.is-always-mobile-nav .wide-nav-expand {
  38. @media (min-width: 75rem) {
  39. visibility: hidden;
  40. }
  41. }
  42. .wide-nav-expand__icon {
  43. position: relative;
  44. width: var(--sp2);
  45. height: 1.3125rem;
  46. transition: opacity 0.2s;
  47. pointer-events: none;
  48. opacity: 0;
  49. transform-style: preserve-3d;
  50. & > span {
  51. display: block;
  52. height: 0;
  53. /* Intentionally not using CSS logical properties. */
  54. border-top: solid 3px currentColor;
  55. &:nth-child(1) {
  56. position: absolute;
  57. inset-block-start: 0;
  58. inset-inline-start: 0;
  59. width: 100%;
  60. height: 0;
  61. transition: transform 0.2s;
  62. background-color: currentColor;
  63. }
  64. &:nth-child(2) {
  65. position: absolute;
  66. inset-block-start: 0.5625rem;
  67. inset-inline-start: 0;
  68. width: 100%;
  69. height: 0;
  70. transition: opacity 0.2s;
  71. background-color: currentColor;
  72. }
  73. &:nth-child(3) {
  74. position: absolute;
  75. inset-block: auto 0;
  76. inset-inline-start: 0;
  77. width: 100%;
  78. height: 0;
  79. transition: transform 0.2s;
  80. background-color: currentColor;
  81. }
  82. }
  83. }
  84. .is-fixed .wide-nav-expand__icon {
  85. opacity: 1;
  86. }
  87. [aria-expanded="true"] .wide-nav-expand__icon {
  88. & > span:nth-child(1) {
  89. inset-block-start: 0.5625rem;
  90. transform: rotate(-45deg);
  91. }
  92. & > span:nth-child(2) {
  93. opacity: 0;
  94. }
  95. & > span:nth-child(3) {
  96. inset-block-start: 0.5625rem;
  97. transform: rotate(45deg);
  98. }
  99. }

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