You are here

sm-menu-toggle.css in Smartmenus.js 8

Same filename and directory in other branches
  1. 7 css/sm-menu-toggle.css
.block-smartmenus .contextual {
  z-index: 999999;
}
.smartmenus-nav a.sm-link {
  border: 0px;
}
.sm {
  z-index: 998;
}
.nav-brand {
  float: left;
  margin: 0;
}
.nav-brand a {
  display: block;
  padding: 11px 11px 11px 20px;
  color: #333;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 22px;
  font-weight: normal;
  line-height: 17px;
  text-decoration: none;
}

/* Taken from D7 module */
/*
 * @file
 * CSS for the responsive menu toggle checkbox / button.
 */
.sm-menu-btn {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 28px;
  text-indent: 28px;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* hamburger icon */
.sm-menu-btn-icon,
.sm-menu-btn-icon:before,
.sm-menu-btn-icon:after {
  position: absolute;
  top: 50%;
  left: 2px;
  height: 2px;
  width: 24px;
  background: #bbb;
  -webkit-transition: all 0.25s;
  transition: all 0.25s;
}
.sm-menu-btn-icon:before {
  content: '';
  top: -7px;
  left: 0;
}
.sm-menu-btn-icon:after {
  content: '';
  top: 7px;
  left: 0;
}

/* x icon */
.sm-menu-state:checked ~ .sm-menu-btn .sm-menu-btn-icon {
  height: 0;
  background: transparent;
}
.sm-menu-state:checked ~ .sm-menu-btn .sm-menu-btn-icon:before {
  top: 0;
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
}
.sm-menu-state:checked ~ .sm-menu-btn .sm-menu-btn-icon:after {
  top: 0;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
}

/* hide menu state checkbox (keep it visible to screen readers) */
.sm-menu-state {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
}
/* hide the menu in mobile view */
.sm-menu-state:not(:checked) ~ .sm {
  display: none;
}
.sm-menu-state:checked ~ .sm {
  display: block;
}
@media (min-width: 768px) {
  /* hide the button in desktop view */
  .sm-menu-btn {
    position: absolute;
    top: -99999px;
  }
  /* always show the menu in desktop view */
  .sm-menu-state:not(:checked) ~ .sm {
    display: block;
  }
}

File

css/sm-menu-toggle.css
View source
  1. .block-smartmenus .contextual {
  2. z-index: 999999;
  3. }
  4. .smartmenus-nav a.sm-link {
  5. border: 0px;
  6. }
  7. .sm {
  8. z-index: 998;
  9. }
  10. .nav-brand {
  11. float: left;
  12. margin: 0;
  13. }
  14. .nav-brand a {
  15. display: block;
  16. padding: 11px 11px 11px 20px;
  17. color: #333;
  18. font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  19. font-size: 22px;
  20. font-weight: normal;
  21. line-height: 17px;
  22. text-decoration: none;
  23. }
  24. /* Taken from D7 module */
  25. /*
  26. * @file
  27. * CSS for the responsive menu toggle checkbox / button.
  28. */
  29. .sm-menu-btn {
  30. position: relative;
  31. display: inline-block;
  32. width: 28px;
  33. height: 28px;
  34. text-indent: 28px;
  35. white-space: nowrap;
  36. overflow: hidden;
  37. cursor: pointer;
  38. -webkit-tap-highlight-color: rgba(0,0,0,0);
  39. }
  40. /* hamburger icon */
  41. .sm-menu-btn-icon,
  42. .sm-menu-btn-icon:before,
  43. .sm-menu-btn-icon:after {
  44. position: absolute;
  45. top: 50%;
  46. left: 2px;
  47. height: 2px;
  48. width: 24px;
  49. background: #bbb;
  50. -webkit-transition: all 0.25s;
  51. transition: all 0.25s;
  52. }
  53. .sm-menu-btn-icon:before {
  54. content: '';
  55. top: -7px;
  56. left: 0;
  57. }
  58. .sm-menu-btn-icon:after {
  59. content: '';
  60. top: 7px;
  61. left: 0;
  62. }
  63. /* x icon */
  64. .sm-menu-state:checked ~ .sm-menu-btn .sm-menu-btn-icon {
  65. height: 0;
  66. background: transparent;
  67. }
  68. .sm-menu-state:checked ~ .sm-menu-btn .sm-menu-btn-icon:before {
  69. top: 0;
  70. -webkit-transform: rotate(-45deg);
  71. transform: rotate(-45deg);
  72. }
  73. .sm-menu-state:checked ~ .sm-menu-btn .sm-menu-btn-icon:after {
  74. top: 0;
  75. -webkit-transform: rotate(45deg);
  76. transform: rotate(45deg);
  77. }
  78. /* hide menu state checkbox (keep it visible to screen readers) */
  79. .sm-menu-state {
  80. position: absolute;
  81. width: 1px;
  82. height: 1px;
  83. margin: -1px;
  84. border: 0;
  85. padding: 0;
  86. overflow: hidden;
  87. clip: rect(1px,1px,1px,1px);
  88. }
  89. /* hide the menu in mobile view */
  90. .sm-menu-state:not(:checked) ~ .sm {
  91. display: none;
  92. }
  93. .sm-menu-state:checked ~ .sm {
  94. display: block;
  95. }
  96. @media (min-width: 768px) {
  97. /* hide the button in desktop view */
  98. .sm-menu-btn {
  99. position: absolute;
  100. top: -99999px;
  101. }
  102. /* always show the menu in desktop view */
  103. .sm-menu-state:not(:checked) ~ .sm {
  104. display: block;
  105. }
  106. }