toolbar.less 6.7 KB

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