You are here

ultimenu.extras.css in Ultimenu 8.2

This file contains extra overrides, and few more to save headaches.

You can disable this file inclusion via UI: /admin/structure/ultimenu,

Tips: If flyout was covered by another content, add higher z-index layering to its parent block, e.g.: .block-ultimenu {position: relative; z-index: 9999;}

File

css/ultimenu.extras.css
View source
  1. /**
  2. * @file
  3. * This file contains extra overrides, and few more to save headaches.
  4. *
  5. * You can disable this file inclusion via UI: /admin/structure/ultimenu,
  6. *
  7. * Tips:
  8. * If flyout was covered by another content, add higher z-index layering to its
  9. * parent block, e.g.: .block-ultimenu {position: relative; z-index: 9999;}
  10. */
  11. /* Remove this box-sizing if your theme is already using one globally */
  12. .ultimenu *,
  13. .ultimenu *::before,
  14. .ultimenu *::after {
  15. box-sizing: border-box;
  16. }
  17. /** Prevents flyout from being covered by other contents, adjust it.
  18. Adjust it to the relevant block class, e.g.: .block--ultimenu, etc. */
  19. .block-ultimenu {
  20. position: relative;
  21. z-index: 98;
  22. }
  23. /** Adjust it to the relevant sidebar class, e.g.: .l-sidebar, etc. */
  24. .sidebar .block-ultimenu {
  25. z-index: 96;
  26. }
  27. .block .ultimenu {
  28. padding: 0;
  29. }
  30. /** Prevents overflowing block contents. */
  31. .ultimenu__flyout .block {
  32. max-width: 100%;
  33. padding: 1em 0;
  34. }
  35. /** Generally Ultimenu mobile menu items have background color. */
  36. .is-ultimenu-canvas--active .ultimenu--main .is-active-trail > a {
  37. color: #fff;
  38. }
  39. /**
  40. * Link.
  41. */
  42. .ultimenu--main .ultimenu__link,
  43. .ultimenu .ultimenu__ajax {
  44. padding: 1em 1.75em;
  45. min-height: 42px;
  46. }
  47. .ultimenu .ultimenu__ajax {
  48. display: block;
  49. }
  50. /**
  51. * Menu description.
  52. */
  53. .ultimenu__link small {
  54. display: block;
  55. line-height: 1;
  56. }
  57. /**
  58. * Default icon styling.
  59. */
  60. .ultimenu__icon,
  61. .ultimenu__title,
  62. .ultimenu__icon::before {
  63. display: inline-block;
  64. vertical-align: bottom;
  65. }
  66. .ultimenu__icon {
  67. font-size: 28px;
  68. text-align: center;
  69. width: 42px;
  70. }
  71. /* Mobile needs a handler for click event. */
  72. .has-ultimenu .caret {
  73. background-color: rgba(0, 0, 0, .2);
  74. cursor: pointer;
  75. display: block;
  76. height: 100%;
  77. min-height: 34px;
  78. position: absolute;
  79. right: 0; /* LTR */
  80. top: 0;
  81. width: 48px;
  82. }
  83. [dir="rtl"] .has-ultimenu .caret {
  84. left: 0;
  85. right: auto;
  86. }
  87. .has-ultimenu .caret::before {
  88. border: 8px solid transparent;
  89. border-top: 12px solid #fff;
  90. content: '';
  91. display: block;
  92. height: 0;
  93. position: absolute;
  94. left: 50%;
  95. top: 50%;
  96. width: 0;
  97. z-index: 2;
  98. transition: all .2s;
  99. transform: translate(-50%, -50%);
  100. }
  101. .has-ultimenu .is-ultimenu-active .caret::before {
  102. border-bottom: 12px solid #fff;
  103. border-top: 0;
  104. }
  105. /**
  106. * Core Bartik do not have clearfix for region, add support for floating blocks
  107. * with micro clearfix.
  108. */
  109. .ultimenu__flyout::after,
  110. .ultimenu__region::after {
  111. clear: both;
  112. content: " ";
  113. display: table;
  114. }
  115. /** Overrides Bartik footer region. */
  116. .block .ultimenu__flyout .ultimenu__region {
  117. margin: 0;
  118. }
  119. /**
  120. * Overrides Bartik to avoid confusion with disappearing Ultimenu menu items.
  121. * One prime sample why Ultimenu refuses to deal with theme compatibility.
  122. */
  123. body:not(:target) .ultimenu .ultimenu__region .menu-item {
  124. height: auto;
  125. }
  126. /**
  127. * 944px+ with 16px base font.
  128. */
  129. @media all and (min-width: 59em) {
  130. .ultimenu .ultimenu__link {
  131. line-height: 1.4;
  132. }
  133. .ultimenu--htb .ultimenu__region {
  134. box-shadow: 0 2px 2px rgba(0 ,0, 0, .2);
  135. }
  136. .ultimenu--htb .ultimenu__flyout,
  137. .ultimenu--htb .ultimenu__region {
  138. border-radius: 0 0 9px 0;
  139. }
  140. .ultimenu--htt .ultimenu__flyout,
  141. .ultimenu--htt .ultimenu__region {
  142. border-radius: 0 9px 0 0;
  143. }
  144. /** The AJAX fallback link. Do not display block so to have correct throbber. */
  145. .ultimenu .ultimenu__ajax {
  146. display: inline-block;
  147. padding: 0 1.25em;
  148. vertical-align: middle;
  149. }
  150. /** Different themes different markups, and CSS rules, this is just an idea. */
  151. #header .ultimenu--hover .ultimenu__flyout,
  152. #footer .ultimenu--hover .ultimenu__flyout,
  153. .sidebar .ultimenu__flyout {
  154. min-width: 600px;
  155. }
  156. }