toolbar.less 6.1 KB

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