toolbar.less 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  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. // At large screen sizes, center relative to the viewport
  111. @media (min-width: @screen-lg-min) {
  112. width: 300px;
  113. position: absolute;
  114. top: 0;
  115. left: 50%;
  116. margin-left: -150px;
  117. }
  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. }