toolbar.less 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  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,
  8. .toolbar-right > a,
  9. button {
  10. position: relative;
  11. .label {
  12. position: absolute;
  13. top: 0;
  14. right: 0;
  15. padding: 0.15em 0.6em 0.2em;
  16. font-size: 60%;
  17. pointer-events: none; // Labels were capturing button/anchor clicks.
  18. }
  19. }
  20. .toolbar-right {
  21. button {
  22. background: transparent;
  23. box-shadow: none;
  24. }
  25. }
  26. > a:focus,
  27. button:focus {
  28. outline: none;
  29. }
  30. > a:not(.btn),
  31. > button,
  32. .toolbar-left > a:not(.btn),
  33. .toolbar-left > button,
  34. .toolbar-right > a:not(.btn),
  35. .toolbar-right > button {
  36. display: inline-block;
  37. color: @toolbar-icon-btn-color;
  38. background-color: transparent;
  39. padding: 4px 2px;
  40. line-height: 1;
  41. height: 24px;
  42. border-radius: @border-radius-small;
  43. &.toolbar-header-back-projects {
  44. padding: 5px 10px 4px;
  45. margin-bottom: 1px;
  46. }
  47. &:hover {
  48. text-shadow: @toolbar-icon-btn-hover-shadow;
  49. color: @toolbar-icon-btn-hover-color;
  50. background-color: transparent;
  51. text-decoration: none;
  52. }
  53. &.active,
  54. &:active {
  55. .label {
  56. display: none;
  57. }
  58. color: white;
  59. background-color: @link-color;
  60. box-shadow: @toolbar-icon-btn-hover-boxshadow;
  61. &:hover {
  62. color: white;
  63. }
  64. }
  65. }
  66. &.toolbar-pdf > a:not(.btn) {
  67. margin-right: 3px;
  68. }
  69. .btn-full-height {
  70. border: none;
  71. border-radius: 0;
  72. border-right: 1px solid @toolbar-header-btn-border-color;
  73. color: @toolbar-btn-color;
  74. padding: 3px 10px 5px;
  75. font-size: 20px;
  76. max-height: 39px;
  77. &:hover {
  78. text-shadow: @toolbar-btn-hover-text-shadow;
  79. background-color: @toolbar-btn-hover-bg-color;
  80. color: @toolbar-btn-hover-color;
  81. }
  82. &.active,
  83. &:active {
  84. color: @toolbar-btn-active-color;
  85. background-color: @toolbar-btn-active-bg-color;
  86. box-shadow: @toolbar-btn-active-shadow;
  87. }
  88. .label {
  89. top: 4px;
  90. right: 4px;
  91. }
  92. &.header-cobranding-logo-container {
  93. height: @toolbar-height - 1;
  94. padding: 8px 10px;
  95. background-color: @toolbar-header-branded-btn-bg-color;
  96. }
  97. }
  98. .btn-full-height-no-border {
  99. border-right: 0;
  100. border-left: 0;
  101. }
  102. .toolbar-left {
  103. display: flex;
  104. float: left;
  105. text-align: center;
  106. align-items: center;
  107. }
  108. .toolbar-right {
  109. display: flex;
  110. align-items: center;
  111. flex-grow: 1;
  112. justify-content: flex-end;
  113. .btn-full-height {
  114. border-right: 0;
  115. border-left: 1px solid @toolbar-header-btn-border-color;
  116. }
  117. }
  118. .toolbar-center {
  119. text-align: center;
  120. text-overflow: ellipsis;
  121. overflow: hidden;
  122. // At small screen sizes, center relative to the left menu and right buttons
  123. width: 100%;
  124. display: flex;
  125. justify-content: center;
  126. }
  127. &.toolbar-header {
  128. background-color: @toolbar-header-bg-color;
  129. box-shadow: @toolbar-header-shadow;
  130. position: absolute;
  131. top: 0;
  132. left: 0;
  133. right: 0;
  134. z-index: 1;
  135. }
  136. &.toolbar-small {
  137. .toolbar-small-mixin;
  138. }
  139. &.toolbar-tall {
  140. .toolbar-small-mixin;
  141. }
  142. &.toolbar-alt {
  143. .toolbar-alt-mixin;
  144. }
  145. }
  146. #layout-dropdown {
  147. // override style added by required bsStyle react-bootstrap prop
  148. text-decoration: none !important;
  149. }
  150. #layout-dropdown-list {
  151. a {
  152. i,
  153. svg {
  154. margin-right: @margin-xs;
  155. }
  156. }
  157. }
  158. .header-cobranding-logo {
  159. display: block;
  160. width: auto;
  161. max-height: 100%;
  162. }
  163. .toolbar-small-mixin() {
  164. height: @toolbar-small-height;
  165. }
  166. .toolbar-tall-mixin() {
  167. height: @toolbar-tall-height;
  168. padding-top: 10px;
  169. }
  170. .toolbar-alt-mixin() {
  171. background-color: @toolbar-alt-bg-color;
  172. }
  173. .toolbar-label {
  174. display: none;
  175. margin: 0 4px;
  176. font-size: @toolbar-font-size;
  177. font-weight: 600;
  178. margin-bottom: 2px;
  179. vertical-align: middle;
  180. text-align: left;
  181. @media (min-width: @screen-md-min) {
  182. display: inline-block;
  183. }
  184. &.toolbar-label-multiline {
  185. line-height: 1.1;
  186. }
  187. }
  188. .editor-dark {
  189. .toolbar-alt {
  190. background-color: darken(@editor-dark-background-color, 0%);
  191. }
  192. .toolbar {
  193. border-color: @editor-dark-toolbar-border-color;
  194. .btn-full-height {
  195. border-color: @editor-dark-toolbar-border-color;
  196. &:hover {
  197. background-color: black;
  198. color: lighten(@link-color, 10%);
  199. }
  200. }
  201. &.toolbar-header {
  202. box-shadow: none;
  203. }
  204. > a:not(.btn) {
  205. color: @gray;
  206. &:hover {
  207. color: @gray-light;
  208. }
  209. }
  210. }
  211. }
  212. /**************************************
  213. Toggle Switch
  214. ***************************************/
  215. .toggle-wrapper {
  216. min-width: 200px;
  217. height: 24px;
  218. }
  219. .toggle-switch {
  220. position: relative;
  221. height: 100%;
  222. width: 100%;
  223. background-color: @toggle-switch-bg;
  224. border-radius: @btn-border-radius-base;
  225. }
  226. .toggle-switch-label {
  227. position: relative;
  228. display: block;
  229. font-weight: normal;
  230. z-index: 2;
  231. float: left;
  232. width: 50%;
  233. height: 100%;
  234. line-height: 24px;
  235. text-align: center;
  236. margin-bottom: 0;
  237. cursor: pointer;
  238. user-select: none;
  239. color: @text-color;
  240. transition: color 0.12s ease-out;
  241. }
  242. .toggle-switch-input {
  243. position: absolute;
  244. opacity: 0;
  245. }
  246. .toggle-switch-input:checked + .toggle-switch-label {
  247. color: #fff;
  248. font-weight: bold;
  249. }
  250. .toggle-switch-selection {
  251. display: block;
  252. position: absolute;
  253. z-index: 1;
  254. top: 2px;
  255. left: 2px;
  256. right: 2px;
  257. width: calc(~'50% - 2px');
  258. height: calc(~'100% - 4px');
  259. background: @toggle-switch-highlight-color;
  260. border-radius: @btn-border-radius-base 0 0 @btn-border-radius-base;
  261. transition: transform 0.12s ease-out, border-radius 0.12s ease-out;
  262. }
  263. .toggle-switch-input:checked:nth-child(4) ~ .toggle-switch-selection {
  264. transform: translate(100%);
  265. border-radius: 0 @btn-border-radius-base @btn-border-radius-base 0;
  266. }
  267. /**************************************
  268. Formatting buttons
  269. ***************************************/
  270. .formatting-buttons {
  271. width: 100%;
  272. overflow: hidden;
  273. }
  274. .formatting-buttons-wrapper {
  275. display: flex;
  276. }
  277. .formatting-btn {
  278. color: @formatting-btn-color;
  279. background-color: @formatting-btn-bg;
  280. padding: 0;
  281. height: 100%;
  282. display: flex;
  283. align-items: center;
  284. justify-content: center;
  285. box-shadow: none;
  286. border: none;
  287. border-left: 1px solid @formatting-btn-border;
  288. border-radius: 0;
  289. &:hover {
  290. color: @formatting-btn-color;
  291. }
  292. &.active {
  293. color: @toolbar-btn-active-color;
  294. background-color: @toolbar-btn-active-bg-color;
  295. box-shadow: @toolbar-btn-active-shadow;
  296. &:focus {
  297. color: @toolbar-btn-active-color;
  298. &:not(:focus-visible) {
  299. outline: none;
  300. }
  301. }
  302. }
  303. &:focus {
  304. color: @formatting-btn-color;
  305. }
  306. }
  307. .formatting-btn--icon {
  308. min-width: 32px;
  309. width: 32px;
  310. }
  311. .formatting-btn--icon:last-of-type {
  312. border-right: 1px solid @formatting-btn-border;
  313. }
  314. .formatting-btn--more {
  315. padding-left: 9px;
  316. padding-right: 9px;
  317. .caret {
  318. margin-top: 1px;
  319. }
  320. }
  321. .formatting-icon {
  322. font-style: normal;
  323. line-height: 1.5;
  324. }
  325. .formatting-icon--small {
  326. font-size: small;
  327. line-height: 1.9;
  328. }
  329. .formatting-icon--serif {
  330. font-family: @font-family-serif;
  331. }
  332. .formatting-more {
  333. margin-left: auto;
  334. }
  335. .formatting-menu {
  336. min-width: auto;
  337. max-width: 130px;
  338. background-color: @formatting-menu-bg;
  339. }
  340. .formatting-menu-item {
  341. float: left;
  342. }
  343. .formatting-menu-item > .formatting-btn {
  344. border-right: none;
  345. }
  346. // Disable border on left-most icon in menu
  347. .formatting-menu-item:nth-of-type(4n + 1) > .formatting-btn {
  348. border-left: none;
  349. }
  350. .toolbar.toolbar-pdf > a[disabled] {
  351. cursor: not-allowed;
  352. .opacity(0.65);
  353. .box-shadow(none);
  354. }
  355. .menu-item-with-svg {
  356. svg {
  357. line,
  358. rect {
  359. stroke: @dropdown-link-color;
  360. }
  361. path {
  362. fill: @dropdown-link-color;
  363. }
  364. }
  365. a:hover,
  366. a:focus {
  367. svg {
  368. line,
  369. rect {
  370. stroke: @dropdown-link-hover-color;
  371. }
  372. path {
  373. fill: @dropdown-link-hover-color;
  374. }
  375. }
  376. }
  377. &.disabled {
  378. .subdued {
  379. color: @dropdown-link-disabled-color;
  380. }
  381. svg {
  382. line,
  383. rect {
  384. stroke: @dropdown-link-disabled-color;
  385. }
  386. path {
  387. fill: @dropdown-link-disabled-color;
  388. }
  389. }
  390. a:hover,
  391. a:focus {
  392. .subdued {
  393. color: @dropdown-link-disabled-color;
  394. }
  395. svg {
  396. line,
  397. rect {
  398. stroke: @dropdown-link-disabled-color;
  399. }
  400. path {
  401. fill: @dropdown-link-disabled-color;
  402. }
  403. }
  404. }
  405. }
  406. }