toolbar.less 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. @toolbar-height: 40px;
  2. .toolbar {
  3. display: flex;
  4. align-items: center;
  5. height: @toolbar-height;
  6. border-bottom: @toolbar-border-bottom;
  7. > a, .toolbar-right > a {
  8. position: relative;
  9. .label {
  10. position: absolute;
  11. top: 0;
  12. right: 0;
  13. padding: .15em .6em .2em;
  14. font-size: 60%;
  15. pointer-events: none; // Labels were capturing button/anchor clicks.
  16. }
  17. }
  18. > a:focus {
  19. outline: none;
  20. }
  21. > a:not(.btn),
  22. .toolbar-left > a:not(.btn),
  23. .toolbar-right > a:not(.btn) {
  24. display: inline-block;
  25. color: @toolbar-icon-btn-color;
  26. padding: 4px 2px;
  27. line-height: 1;
  28. height: 24px;
  29. border-radius: @border-radius-small;
  30. &.toolbar-header-back-projects {
  31. padding: 5px 10px 4px;
  32. margin-bottom: 1px;
  33. }
  34. &:hover {
  35. text-shadow: @toolbar-icon-btn-hover-shadow;
  36. color: @toolbar-icon-btn-hover-color;
  37. text-decoration: none;
  38. }
  39. &.active, &:active {
  40. .label {
  41. display: none;
  42. }
  43. color: white;
  44. background-color: @link-color;
  45. box-shadow: @toolbar-icon-btn-hover-boxshadow;
  46. &:hover {
  47. color: white;
  48. }
  49. }
  50. }
  51. &.toolbar-pdf > a:not(.btn) {
  52. margin-right: 3px;
  53. }
  54. .btn-full-height {
  55. border: none;
  56. border-radius: 0;
  57. border-right: 1px solid @toolbar-header-btn-border-color;
  58. color: @toolbar-btn-color;
  59. padding: 3px 10px 5px;
  60. font-size: 20px;
  61. max-height: 39px;
  62. &:hover {
  63. text-shadow: @toolbar-btn-hover-text-shadow;
  64. background-color: @toolbar-btn-hover-bg-color;
  65. color: @toolbar-btn-hover-color;
  66. }
  67. &.active, &:active {
  68. color: @toolbar-btn-active-color;
  69. background-color: @toolbar-btn-active-bg-color;
  70. box-shadow: @toolbar-btn-active-shadow;
  71. }
  72. .label {
  73. top: 4px;
  74. right: 4px;
  75. }
  76. &.header-cobranding-logo-container {
  77. height: @toolbar-height - 1;
  78. padding: 8px 10px;
  79. background-color: @toolbar-header-branded-btn-bg-color;
  80. }
  81. }
  82. .btn-full-height-no-border {
  83. border-right: 0;
  84. border-left: 0;
  85. }
  86. .toolbar-left {
  87. display: flex;
  88. float: left;
  89. text-align: center;
  90. align-items: center;
  91. }
  92. .toolbar-right {
  93. display: flex;
  94. align-items: center;
  95. flex-grow: 1;
  96. justify-content: flex-end;
  97. .btn-full-height {
  98. border-right: 0;
  99. border-left: 1px solid @toolbar-header-btn-border-color;
  100. }
  101. }
  102. .toolbar-center {
  103. width: 300px;
  104. position: absolute;
  105. top: 0;
  106. left: 50%;
  107. margin-left: -150px;
  108. text-align: center;
  109. text-overflow: ellipsis;
  110. overflow: hidden;
  111. }
  112. &.toolbar-header {
  113. background-color: @toolbar-header-bg-color;
  114. box-shadow: @toolbar-header-shadow;
  115. position: absolute;
  116. top: 0;
  117. left: 0;
  118. right: 0;
  119. z-index: 1;
  120. }
  121. &.toolbar-small {
  122. .toolbar-small-mixin;
  123. }
  124. &.toolbar-tall {
  125. .toolbar-small-mixin;
  126. }
  127. &.toolbar-alt {
  128. .toolbar-alt-mixin;
  129. }
  130. }
  131. .header-cobranding-logo {
  132. display: block;
  133. width: auto;
  134. max-height: 100%;
  135. }
  136. .toolbar-small-mixin() {
  137. height: @toolbar-small-height;
  138. }
  139. .toolbar-tall-mixin() {
  140. height: @toolbar-tall-height;
  141. padding-top: 10px;
  142. }
  143. .toolbar-alt-mixin() {
  144. background-color: @toolbar-alt-bg-color;
  145. }
  146. .toolbar-label {
  147. display: none;
  148. margin: 0 4px;
  149. font-size: @toolbar-font-size;
  150. font-weight: 600;
  151. margin-bottom: 2px;
  152. vertical-align: middle;
  153. text-align: left;
  154. @media (min-width: @screen-sm-min) {
  155. display: inline-block;
  156. }
  157. &.toolbar-label-multiline {
  158. line-height: 1.1;
  159. }
  160. }
  161. .editor-dark {
  162. .toolbar-alt {
  163. background-color: darken(@editor-dark-background-color, 0%);
  164. }
  165. .toolbar {
  166. border-color: @editor-dark-toolbar-border-color;
  167. .btn-full-height {
  168. border-color: @editor-dark-toolbar-border-color;
  169. &:hover {
  170. background-color: black;
  171. color: lighten(@link-color, 10%);
  172. }
  173. }
  174. &.toolbar-header {
  175. box-shadow: none;
  176. }
  177. > a:not(.btn) {
  178. color: @gray;
  179. &:hover {
  180. color: @gray-light;
  181. }
  182. }
  183. }
  184. }
  185. /**************************************
  186. Toggle Switch
  187. ***************************************/
  188. .toggle-wrapper {
  189. min-width: 200px;
  190. height: 24px;
  191. }
  192. .toggle-switch {
  193. position: relative;
  194. height: 100%;
  195. width: 100%;
  196. background-color: @toggle-switch-bg;
  197. border-radius: @btn-border-radius-base;
  198. }
  199. .toggle-switch-label {
  200. position: relative;
  201. display: block;
  202. font-weight: normal;
  203. z-index: 2;
  204. float: left;
  205. width: 50%;
  206. height: 100%;
  207. line-height: 24px;
  208. text-align: center;
  209. margin-bottom: 0;
  210. cursor: pointer;
  211. user-select: none;
  212. color: @text-color;
  213. transition: color 0.12s ease-out;
  214. }
  215. .toggle-switch-input {
  216. position: absolute;
  217. opacity: 0;
  218. }
  219. .toggle-switch-input:checked + .toggle-switch-label {
  220. color: #fff;
  221. font-weight: bold;
  222. }
  223. .toggle-switch-selection {
  224. display: block;
  225. position: absolute;
  226. z-index: 1;
  227. top: 2px;
  228. left: 2px;
  229. right: 2px;
  230. width: calc(~"50% - 2px");
  231. height: calc(~"100% - 4px");
  232. background: @toggle-switch-highlight-color;
  233. border-radius: @btn-border-radius-base 0 0 @btn-border-radius-base;
  234. transition: transform 0.12s ease-out, border-radius 0.12s ease-out;
  235. }
  236. .toggle-switch-input:checked:nth-child(4) ~ .toggle-switch-selection {
  237. transform: translate(100%);
  238. border-radius: 0 @btn-border-radius-base @btn-border-radius-base 0;
  239. }
  240. /**************************************
  241. Formatting buttons
  242. ***************************************/
  243. .formatting-buttons {
  244. width: 100%;
  245. overflow: hidden;
  246. }
  247. .formatting-buttons-wrapper {
  248. display: flex;
  249. }
  250. .formatting-btn {
  251. color: @formatting-btn-color;
  252. background-color: @formatting-btn-bg;
  253. padding: 0;
  254. height: 100%;
  255. display: flex;
  256. align-items: center;
  257. justify-content: center;
  258. box-shadow: none;
  259. border: none;
  260. border-left: 1px solid @formatting-btn-border;
  261. border-radius: 0;
  262. &:hover {
  263. color: @formatting-btn-color;
  264. }
  265. }
  266. .formatting-btn--icon {
  267. min-width: 32px;
  268. width: 32px;
  269. }
  270. .formatting-btn--icon:last-of-type {
  271. border-right: 1px solid @formatting-btn-border;
  272. }
  273. .formatting-btn--more {
  274. padding-left: 9px;
  275. padding-right: 9px;
  276. .caret {
  277. margin-top: 1px;
  278. }
  279. }
  280. .formatting-icon {
  281. font-style: normal;
  282. line-height: 1.5;
  283. }
  284. .formatting-icon--small {
  285. font-size: small;
  286. line-height: 1.9;
  287. }
  288. .formatting-icon--serif {
  289. font-family: @font-family-serif;
  290. }
  291. .formatting-more {
  292. margin-left: auto;
  293. }
  294. .formatting-menu {
  295. min-width: auto;
  296. max-width: 130px;
  297. background-color: @formatting-menu-bg;
  298. }
  299. .formatting-menu-item {
  300. float: left;
  301. }
  302. .formatting-menu-item > .formatting-btn {
  303. border-right: none;
  304. }
  305. // Disable border on left-most icon in menu
  306. .formatting-menu-item:nth-of-type(4n + 1) > .formatting-btn {
  307. border-left: none;
  308. }