toolbar.less 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. .toolbar {
  2. display: flex;
  3. align-items: center;
  4. height: 40px;
  5. border-bottom: @toolbar-border-bottom;
  6. > a, .toolbar-right > a {
  7. position: relative;
  8. .label {
  9. position: absolute;
  10. top: 0;
  11. right: 0;
  12. padding: .15em .6em .2em;
  13. font-size: 60%;
  14. pointer-events: none; // Labels were capturing button/anchor clicks.
  15. }
  16. }
  17. > a:focus {
  18. outline: none;
  19. }
  20. > a:not(.btn),
  21. .toolbar-left > a:not(.btn),
  22. .toolbar-right > a:not(.btn) {
  23. display: inline-block;
  24. color: @toolbar-icon-btn-color;
  25. padding: 0 5px;
  26. border-radius: @border-radius-small;
  27. &.toolbar-header-back-projects {
  28. padding: 5px 10px 4px;
  29. margin-bottom: 1px;
  30. }
  31. &:hover {
  32. text-shadow: @toolbar-icon-btn-hover-shadow;
  33. color: @toolbar-icon-btn-hover-color;
  34. text-decoration: none;
  35. }
  36. &.active, &:active {
  37. .label {
  38. display: none;
  39. }
  40. color: white;
  41. background-color: @link-color;
  42. box-shadow: @toolbar-icon-btn-hover-boxshadow;
  43. &:hover {
  44. color: white;
  45. }
  46. }
  47. }
  48. .btn-full-height {
  49. border: none;
  50. border-radius: 0;
  51. border-right: 1px solid @toolbar-border-color;
  52. color: @toolbar-btn-color;
  53. padding: 3px 10px 5px;
  54. font-size: 20px;
  55. &:hover {
  56. text-shadow: @toolbar-btn-hover-text-shadow;
  57. background-color: @toolbar-btn-hover-bg-color;
  58. color: @toolbar-btn-hover-color;
  59. }
  60. &.active, &:active {
  61. color: @toolbar-btn-active-color;
  62. background-color: @toolbar-btn-active-bg-color;
  63. box-shadow: @toolbar-btn-active-shadow;
  64. }
  65. .label {
  66. top: 4px;
  67. right: 4px;
  68. }
  69. }
  70. .btn-full-height-no-border {
  71. border-right: 0;
  72. border-left: 0;
  73. }
  74. .toolbar-left {
  75. display: flex;
  76. float: left;
  77. text-align: center;
  78. align-items: center;
  79. }
  80. .toolbar-right {
  81. display: flex;
  82. align-items: center;
  83. flex-grow: 1;
  84. justify-content: flex-end;
  85. .btn-full-height {
  86. border-right: 0;
  87. border-left: 1px solid @toolbar-border-color;
  88. }
  89. }
  90. .toolbar-center {
  91. width: 300px;
  92. position: absolute;
  93. top: 0;
  94. left: 50%;
  95. margin-left: -150px;
  96. text-align: center;
  97. text-overflow: ellipsis;
  98. overflow: hidden;
  99. }
  100. &.toolbar-header {
  101. background-color: @toolbar-header-bg-color;
  102. box-shadow: @toolbar-header-shadow;
  103. position: absolute;
  104. top: 0;
  105. left: 0;
  106. right: 0;
  107. z-index: 1;
  108. }
  109. &.toolbar-small {
  110. .toolbar-small-mixin;
  111. }
  112. &.toolbar-tall {
  113. .toolbar-small-mixin;
  114. }
  115. &.toolbar-alt {
  116. .toolbar-alt-mixin;
  117. }
  118. }
  119. .toolbar-small-mixin() {
  120. height: 32px;
  121. }
  122. .toolbar-tall-mixin() {
  123. height: 58px;
  124. padding-top: 10px;
  125. }
  126. .toolbar-alt-mixin() {
  127. background-color: @toolbar-alt-bg-color;
  128. }
  129. .toolbar-label {
  130. display: none;
  131. margin: 0 4px;
  132. font-size: 12px;
  133. font-weight: 600;
  134. margin-bottom: 2px;
  135. vertical-align: middle;
  136. @media (min-width: @screen-sm-min) {
  137. display: inline-block;
  138. }
  139. }
  140. .editor-dark {
  141. .toolbar-alt {
  142. background-color: darken(@editor-dark-background-color, 0%);
  143. }
  144. .toolbar {
  145. border-color: @editor-dark-toolbar-border-color;
  146. .btn-full-height {
  147. border-color: @editor-dark-toolbar-border-color;
  148. &:hover {
  149. background-color: black;
  150. color: lighten(@link-color, 10%);
  151. }
  152. }
  153. &.toolbar-header {
  154. box-shadow: none;
  155. }
  156. > a:not(.btn) {
  157. color: @gray;
  158. &:hover {
  159. color: @gray-light;
  160. }
  161. }
  162. }
  163. }