toolbar.less 3.1 KB

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