toolbar.less 7.0 KB

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