old-toggle-button.less 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. .enable_old_menu_toggle_button() when(@enable-old-menu-toggle-button = true) {
  2. .enable_responsive_menu_otb() when(@enable-responsive-menu = true) {
  3. @toggler-text: "MENU";
  4. @media only screen and (max-width: @grid-float-breakpoint-max) {
  5. .menu-toggler + .sidebar.responsive {
  6. margin-top: @breadcrumb-height - 1;
  7. }
  8. .main-container .menu-toggler {
  9. display: block;
  10. position: absolute;
  11. //left: auto;
  12. z-index: @zindex-sidebar-fixed - 1;
  13. width: 52px;
  14. height: 32px;
  15. margin-right: 2px;
  16. line-height: normal;
  17. padding-left: 33px;
  18. padding-top: 7px;
  19. padding-bottom: 1px;
  20. font-size: @font-size-old-toggle-button;
  21. font-weight: bold;
  22. text-transform: uppercase;
  23. .box-sizing(content-box);
  24. &:hover {
  25. text-decoration: none;
  26. }
  27. &:focus {
  28. outline: none;
  29. }
  30. &:before {
  31. border-top: 1px solid @sidebar-toggler-line-1;
  32. border-bottom: 1px solid @sidebar-toggler-line-2;
  33. height: 2px;
  34. width: 24px;
  35. content: "";
  36. position: absolute;
  37. z-index: 1;
  38. top: 13px;
  39. left: 4px;
  40. .transition(~"all 0.1s ease");
  41. -o-transition: none;
  42. .box-sizing(content-box);
  43. }
  44. &:after {
  45. border-top: 1px solid @sidebar-toggler-line-3;
  46. border-bottom: 1px solid @sidebar-toggler-line-4;
  47. content: "";
  48. height: 2px;
  49. width: 24px;
  50. position: absolute;
  51. top: 19px;
  52. left: 4px;
  53. .transition(~"all 0.1s ease");
  54. -o-transition: none;
  55. .box-sizing(content-box);
  56. }
  57. &.display {
  58. &:before {
  59. height: 4px;
  60. top: 8px;
  61. border-width: 2px;
  62. }
  63. &:after {
  64. height: 4px;
  65. top: 20px;
  66. border-width: 2px;
  67. }
  68. }
  69. > .toggler-text {
  70. display: block;
  71. position: absolute;
  72. bottom: -9px;
  73. left: 0;
  74. border: 1px solid transparent;
  75. border-width: 9px 42px 0;
  76. border-top-color: @sidebar-toggler-background;
  77. -moz-border-top-colors: @sidebar-toggler-background;
  78. &:after {
  79. display: block;
  80. content: @toggler-text;
  81. color: @sidebar-toggler-color;
  82. position: absolute;
  83. left: -8px;//change these to adjust text placement
  84. top: -41px;
  85. }
  86. }
  87. }
  88. //hide the .nav-list when moving up, otherwise it will move over .menu-toggler!
  89. .menu-toggler + .responsive.sidebar-scroll .nav-wrap {
  90. overflow: hidden;
  91. }
  92. }
  93. @media only screen and (max-width: @screen-tiny) {
  94. .main-container .menu-toggler {
  95. width: 0;
  96. > .toggler-text {
  97. border-width: 7px 16px;
  98. bottom: -14px;
  99. &:after {
  100. font-size: floor(@font-size-old-toggle-button * 0.75);
  101. font-weight: normal;
  102. color: #FFF;
  103. position: absolute;
  104. left: -13px;
  105. top: -42px;
  106. }
  107. }
  108. &:before , &:after {
  109. margin-top: 8px;
  110. }
  111. &.display {
  112. &:before , &:after {
  113. height: 2px;
  114. border-width: 1px;
  115. }
  116. &:before {
  117. top: 13px;
  118. }
  119. &:after {
  120. top: 19px;
  121. }
  122. }
  123. }
  124. }
  125. }
  126. .enable_responsive_menu_otb();
  127. }
  128. .enable_old_menu_toggle_button();