toolbar.less 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  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. min-width: 200px;
  228. height: 24px;
  229. }
  230. .toggle-switch {
  231. align-items: center;
  232. height: 24px;
  233. width: 100%;
  234. background-color: @toggle-switch-bg;
  235. border: 2px solid @toggle-switch-bg;
  236. border-radius: @btn-border-radius-base;
  237. overflow: hidden;
  238. }
  239. .toggle-switch-label {
  240. display: inline-block;
  241. float: left;
  242. font-weight: normal;
  243. height: 100%;
  244. width: 50%;
  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. 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. /**************************************
  284. Formatting buttons
  285. ***************************************/
  286. .formatting-buttons {
  287. width: 100%;
  288. overflow: hidden;
  289. }
  290. .formatting-buttons-wrapper {
  291. display: flex;
  292. }
  293. .formatting-btn {
  294. color: @formatting-btn-color;
  295. background-color: @formatting-btn-bg;
  296. padding: 0;
  297. height: 100%;
  298. display: flex;
  299. align-items: center;
  300. justify-content: center;
  301. box-shadow: none;
  302. border: none;
  303. border-left: 1px solid @formatting-btn-border;
  304. border-radius: 0;
  305. &:hover {
  306. color: @formatting-btn-color;
  307. }
  308. &.active {
  309. color: @toolbar-btn-active-color;
  310. background-color: @toolbar-btn-active-bg-color;
  311. box-shadow: @toolbar-btn-active-shadow;
  312. &:focus {
  313. color: @toolbar-btn-active-color;
  314. &:not(:focus-visible) {
  315. outline: none;
  316. }
  317. }
  318. }
  319. &:focus {
  320. color: @formatting-btn-color;
  321. }
  322. }
  323. .formatting-btn--icon {
  324. min-width: 32px;
  325. width: 32px;
  326. }
  327. .formatting-btn--icon:last-of-type {
  328. border-right: 1px solid @formatting-btn-border;
  329. }
  330. .formatting-btn--more {
  331. padding-left: 9px;
  332. padding-right: 9px;
  333. .caret {
  334. margin-top: 1px;
  335. }
  336. }
  337. .formatting-icon {
  338. font-style: normal;
  339. line-height: 1.5;
  340. }
  341. .formatting-icon--small {
  342. font-size: small;
  343. line-height: 1.9;
  344. }
  345. .formatting-icon--serif {
  346. font-family: @font-family-serif;
  347. }
  348. .formatting-more {
  349. margin-left: auto;
  350. }
  351. .formatting-menu {
  352. min-width: auto;
  353. max-width: 130px;
  354. background-color: @formatting-menu-bg;
  355. }
  356. .formatting-menu-item {
  357. float: left;
  358. }
  359. .formatting-menu-item > .formatting-btn {
  360. border-right: none;
  361. }
  362. // Disable border on left-most icon in menu
  363. .formatting-menu-item:nth-of-type(4n + 1) > .formatting-btn {
  364. border-left: none;
  365. }
  366. .toolbar.toolbar-pdf > a[disabled] {
  367. cursor: not-allowed;
  368. .opacity(0.65);
  369. .box-shadow(none);
  370. }
  371. .menu-item-with-svg {
  372. a {
  373. align-items: center;
  374. display: flex !important;
  375. }
  376. svg {
  377. line,
  378. rect {
  379. stroke: @dropdown-link-color;
  380. }
  381. path {
  382. fill: @dropdown-link-color;
  383. }
  384. }
  385. a:hover,
  386. a:focus {
  387. svg {
  388. line,
  389. rect {
  390. stroke: @dropdown-link-hover-color;
  391. }
  392. path {
  393. fill: @dropdown-link-hover-color;
  394. }
  395. }
  396. }
  397. &.disabled {
  398. .subdued {
  399. color: @dropdown-link-disabled-color;
  400. }
  401. svg {
  402. line,
  403. rect {
  404. stroke: @dropdown-link-disabled-color;
  405. }
  406. path {
  407. fill: @dropdown-link-disabled-color;
  408. }
  409. }
  410. a:hover,
  411. a:focus {
  412. .subdued {
  413. color: @dropdown-link-disabled-color;
  414. }
  415. svg {
  416. line,
  417. rect {
  418. stroke: @dropdown-link-disabled-color;
  419. }
  420. path {
  421. fill: @dropdown-link-disabled-color;
  422. }
  423. }
  424. }
  425. }
  426. }