toolbar.less 6.3 KB

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