user-buttons.less 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. //the notifications and new message buttons
  2. .ace-nav {
  3. height: 100%;
  4. margin: 0 !important;
  5. > li {
  6. line-height: @navbar-min-height;
  7. height: @navbar-min-height;
  8. border-left: 1px solid #E1E1E1;
  9. padding: 0;
  10. position: relative;
  11. float: left;
  12. &:first-child {
  13. border-left-width: 0;
  14. }
  15. > a {
  16. background-color: @ace-nav-default;
  17. color: #FFF;
  18. display: block;
  19. line-height: inherit;
  20. text-align: center;
  21. height: 100%;
  22. width: auto;
  23. min-width: 50px;
  24. padding: 0 8px;
  25. position: relative;
  26. > .@{icon} {
  27. display: inline-block;
  28. font-size: @font-size-navbar-user-button-icon;
  29. color: #FFF;
  30. text-align: center;
  31. width: 20px;
  32. }
  33. > .badge {
  34. position: relative;
  35. top: -4px;
  36. left: 2px;
  37. padding-right: 5px;
  38. padding-left: 5px;
  39. }
  40. }
  41. > a:hover , > a:focus, &.open > a {
  42. background-color: desaturate(darken(@ace-nav-default, 4%), 4%);
  43. color: #FFF;
  44. }
  45. //different colors
  46. .ace-nav-color(@color) {
  47. @ace-nav-class: ~`"ace-nav-@{color}"`;
  48. @ace-nav-bg: ~`"ace-nav-@{color}"`;
  49. @ace-nav-cl: @@ace-nav-bg;
  50. &.@{color} > a {
  51. background-color:@ace-nav-cl;
  52. }
  53. &.@{color} > a:hover , &.@{color} > a:focus, &.open.@{color} > a {
  54. background-color: desaturate(darken(@ace-nav-cl, 4%), 4%);
  55. }
  56. }
  57. .ace-nav-color(~"blue");
  58. .ace-nav-color(~"grey");
  59. .ace-nav-color(~"purple");
  60. .ace-nav-color(~"green");
  61. .ace-nav-color(~"light-blue");
  62. .ace-nav-color(~"light-blue2");
  63. .ace-nav-color(~"red");
  64. .ace-nav-color(~"light-green");
  65. .ace-nav-color(~"light-purple");
  66. .ace-nav-color(~"light-orange");
  67. .ace-nav-color(~"light-pink");
  68. .ace-nav-color(~"dark");
  69. .ace-nav-color(~"white-opaque");
  70. .ace-nav-color(~"dark-opaque");
  71. //some extra ones
  72. &.transparent > a {
  73. background-color: transparent;
  74. }
  75. &.transparent > a:hover, &.transparent > a:focus, &.open.transparent > a {
  76. background-color: rgba(0,0,0,0.1);
  77. }
  78. &.light-10 > a {
  79. background-color: rgba(255,255,255,0.1);
  80. }
  81. &.light-10 > a:hover, &.light-10 > a:focus, &.open.light-10 > a {
  82. background-color: rgba(255,255,255,0.2);
  83. }
  84. &.dark-10 > a {
  85. background-color: rgba(0,0,0,0.1);
  86. }
  87. &.dark-10 > a:hover, &.dark-10 > a:focus, &.open.dark-10 > a {
  88. background-color: rgba(0,0,0,0.2);
  89. }
  90. //margins
  91. .marginX (@index) when (@index > 0) {
  92. &.margin-@{index} { margin-left: unit(@index,px); }
  93. .marginX(@index - 1);
  94. }
  95. .marginX(4);
  96. &.no-border {
  97. border-width: 0 !important;
  98. }
  99. ///
  100. .dropdown-menu {
  101. z-index: @zindex-navbar-fixed + 1;
  102. }
  103. }
  104. .nav-user-photo {
  105. margin: -4px 8px 0 0;
  106. border-radius: 100%;
  107. border: 2px solid #FFF;
  108. max-width: 40px;
  109. }
  110. li.dropdown-footer a .@{icon} {
  111. // the arrow indicating "See more" on each dropdown , and the icons of user menu */
  112. display: inline-block;
  113. width: 1.25em;
  114. text-align: center;
  115. }
  116. }
  117. //let dropdowns become like modals in small devices!
  118. @media only screen and (max-height: @screen-qhd-width) {
  119. //@media only screen and (max-height: @screen-topbar-down) {
  120. .ace-nav > li > .dropdown-menu {
  121. position: fixed;
  122. margin-top: auto;
  123. z-index: @zindex-modal + 2;
  124. &:before, &:after {
  125. display: none;
  126. }
  127. }
  128. .ace-nav .user-menu > li > a {
  129. padding-top: 6px;
  130. padding-bottom: 6px;
  131. }
  132. .ace-nav > li.open:before {
  133. background-color: #000;
  134. opacity: 0.5;
  135. border-width: 0;
  136. position: fixed;
  137. left: 0;
  138. right: 0;
  139. top: 0;
  140. bottom: 0;
  141. content: "";
  142. display: block;
  143. height: 2000px;
  144. width: auto;
  145. z-index: @zindex-modal + 1;
  146. }
  147. }