toolbar.less 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  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. border-radius: @btn-border-radius-base;
  236. overflow: hidden;
  237. }
  238. .toggle-switch-label {
  239. display: inline-block;
  240. float: left;
  241. font-weight: normal;
  242. height: 100%;
  243. text-align: center;
  244. margin: 0;
  245. cursor: pointer;
  246. user-select: none;
  247. color: @text-color;
  248. transition: color 0.12s ease-out;
  249. overflow: hidden;
  250. span {
  251. display: flex;
  252. align-items: center;
  253. height: 100%;
  254. line-height: 20px; // parent height minus border
  255. width: 100%;
  256. padding: 0 15px;
  257. background: linear-gradient(
  258. to right,
  259. @toggle-switch-bg 50%,
  260. @toggle-switch-highlight-color 50%
  261. );
  262. background-size: 200% 100%;
  263. background-position: 0 0;
  264. transition: background-position 0.12s ease-out;
  265. }
  266. }
  267. .toggle-switch-input {
  268. position: absolute;
  269. opacity: 0;
  270. }
  271. .toggle-switch-input:checked + .toggle-switch-label {
  272. span {
  273. background-position: -100% 0;
  274. }
  275. color: @white;
  276. font-weight: bold;
  277. }
  278. .toggle-switch-input:checked:nth-child(2) + .toggle-switch-label {
  279. span {
  280. background-position: 100% 0;
  281. }
  282. }
  283. .editor-toggle-switch {
  284. display: flex;
  285. align-items: center;
  286. .toggle-switch {
  287. margin-left: 5px;
  288. }
  289. .toggle-switch-label span {
  290. padding: 1px 6px;
  291. background: none;
  292. transition: background 0.12s ease-out;
  293. border-right: 1px solid @ol-blue-gray-2;
  294. }
  295. .toggle-switch-label:first-of-type span {
  296. padding-left: 8px;
  297. }
  298. .toggle-switch-label:last-of-type span {
  299. padding-right: 8px;
  300. border-right: none;
  301. }
  302. .toggle-switch-input + .toggle-switch-label {
  303. background: @toggle-switch-bg;
  304. }
  305. .toggle-switch-input:checked + .toggle-switch-label {
  306. background: @toggle-switch-highlight-color;
  307. }
  308. }
  309. /**************************************
  310. Formatting buttons
  311. ***************************************/
  312. .formatting-buttons {
  313. width: 100%;
  314. overflow: hidden;
  315. }
  316. .formatting-buttons-wrapper {
  317. display: flex;
  318. }
  319. .formatting-btn {
  320. color: @formatting-btn-color;
  321. background-color: @formatting-btn-bg;
  322. padding: 0;
  323. height: 100%;
  324. display: flex;
  325. align-items: center;
  326. justify-content: center;
  327. box-shadow: none;
  328. border: none;
  329. border-left: 1px solid @formatting-btn-border;
  330. border-radius: 0;
  331. &:hover {
  332. color: @formatting-btn-color;
  333. }
  334. &.active {
  335. color: @toolbar-btn-active-color;
  336. background-color: @toolbar-btn-active-bg-color;
  337. box-shadow: @toolbar-btn-active-shadow;
  338. &:focus {
  339. color: @toolbar-btn-active-color;
  340. &:not(:focus-visible) {
  341. outline: none;
  342. }
  343. }
  344. }
  345. &:focus {
  346. color: @formatting-btn-color;
  347. }
  348. }
  349. .formatting-btn--icon {
  350. min-width: 32px;
  351. width: 32px;
  352. }
  353. .formatting-btn--icon:last-of-type {
  354. border-right: 1px solid @formatting-btn-border;
  355. }
  356. .formatting-btn--more {
  357. padding-left: 9px;
  358. padding-right: 9px;
  359. .caret {
  360. margin-top: 1px;
  361. }
  362. }
  363. .formatting-icon {
  364. font-style: normal;
  365. line-height: 1.5;
  366. }
  367. .formatting-icon--small {
  368. font-size: small;
  369. line-height: 1.9;
  370. }
  371. .formatting-icon--serif {
  372. font-family: @font-family-serif;
  373. }
  374. .formatting-more {
  375. margin-left: auto;
  376. }
  377. .formatting-menu {
  378. min-width: auto;
  379. max-width: 130px;
  380. background-color: @formatting-menu-bg;
  381. }
  382. .formatting-menu-item {
  383. float: left;
  384. }
  385. .formatting-menu-item > .formatting-btn {
  386. border-right: none;
  387. }
  388. // Disable border on left-most icon in menu
  389. .formatting-menu-item:nth-of-type(4n + 1) > .formatting-btn {
  390. border-left: none;
  391. }
  392. .toolbar.toolbar-pdf > a[disabled] {
  393. cursor: not-allowed;
  394. .opacity(0.65);
  395. .box-shadow(none);
  396. }
  397. .menu-item-with-svg {
  398. a {
  399. align-items: center;
  400. display: flex !important;
  401. }
  402. svg {
  403. line,
  404. rect {
  405. stroke: @dropdown-link-color;
  406. }
  407. path {
  408. fill: @dropdown-link-color;
  409. }
  410. }
  411. a:hover,
  412. a:focus {
  413. svg {
  414. line,
  415. rect {
  416. stroke: @dropdown-link-hover-color;
  417. }
  418. path {
  419. fill: @dropdown-link-hover-color;
  420. }
  421. }
  422. }
  423. &.disabled {
  424. .subdued {
  425. color: @dropdown-link-disabled-color;
  426. }
  427. svg {
  428. line,
  429. rect {
  430. stroke: @dropdown-link-disabled-color;
  431. }
  432. path {
  433. fill: @dropdown-link-disabled-color;
  434. }
  435. }
  436. a:hover,
  437. a:focus {
  438. .subdued {
  439. color: @dropdown-link-disabled-color;
  440. }
  441. svg {
  442. line,
  443. rect {
  444. stroke: @dropdown-link-disabled-color;
  445. }
  446. path {
  447. fill: @dropdown-link-disabled-color;
  448. }
  449. }
  450. }
  451. }
  452. }