toolbar.less 6.9 KB

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