toolbar.less 8.7 KB

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