_base.less 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  1. @footer-margin: 40px;
  2. body:not(.full-width) {
  3. font-family: "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, Helvetica, sans-serif !important;
  4. background-color: #fff;
  5. overflow-y: scroll;
  6. overflow-x: auto;
  7. min-width: 1020px;
  8. }
  9. .ui.container:not(.fluid) {
  10. width: 980px !important;
  11. }
  12. h1, h2, h3, h4, h5,
  13. .ui.header,
  14. .ui.menu,
  15. .ui.input input,
  16. .ui.button:not(.label) {
  17. font-family: "PingFang SC", 'Hiragino Sans GB', "Helvetica Neue", "Microsoft YaHei", Arial, Helvetica, sans-serif !important;
  18. }
  19. img {
  20. border-radius: 3px;
  21. }
  22. pre, code {
  23. font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
  24. &.raw {
  25. padding: 7px 12px;
  26. margin: 10px 0;
  27. background-color: #f8f8f8;
  28. border: 1px solid #ddd;
  29. border-radius: 3px;
  30. font-size: 13px;
  31. line-height: 1.5;
  32. overflow: auto;
  33. }
  34. &.wrap {
  35. white-space: pre-wrap;
  36. word-break: break-word;
  37. }
  38. }
  39. .dont-break-out {
  40. /* These are technically the same, but use both */
  41. overflow-wrap: break-word;
  42. word-wrap: break-word;
  43. -ms-word-break: break-all;
  44. /* This is the dangerous one in WebKit, as it breaks things wherever */
  45. word-break: break-all;
  46. /* Instead use this non-standard one: */
  47. word-break: break-word;
  48. /* Adds a hyphen where the word breaks, if supported (No Blink) */
  49. -ms-hyphens: auto;
  50. -moz-hyphens: auto;
  51. -webkit-hyphens: auto;
  52. hyphens: auto;
  53. }
  54. .full.height {
  55. padding: 0;
  56. margin: 0 0 -@footer-margin*2 0;
  57. min-height: 100%;
  58. }
  59. .following.bar {
  60. z-index: 900;
  61. left: 0;
  62. width: 100%;
  63. &.light {
  64. background-color: white;
  65. border-bottom: 1px solid #DDDDDD;
  66. box-shadow: 0 2px 3px rgba(0, 0, 0, 0.04);
  67. }
  68. .column .menu {
  69. margin-top: 0;
  70. }
  71. .top.menu a.item.brand {
  72. padding-left: 0;
  73. padding-right: 0;
  74. }
  75. .brand .ui.mini.image {
  76. width: 30px;
  77. }
  78. .top.menu a.item:hover,
  79. .top.menu .dropdown.item:hover,
  80. .top.menu .dropdown.item.active {
  81. background-color: transparent;
  82. }
  83. .top.menu a.item:hover {
  84. color: rgba(0,0,0,.45);
  85. }
  86. .top.menu .menu {
  87. z-index: 900;
  88. }
  89. .icon,
  90. .octicon {
  91. margin-right: 5px !important;
  92. }
  93. .head.link.item {
  94. padding-right: 0 !important;
  95. }
  96. .avatar > .ui.image {
  97. margin-right: 0;
  98. }
  99. .avatar .octicon-triangle-down {
  100. margin-top: 6.5px;
  101. }
  102. .searchbox {
  103. background-color: rgb(244, 244, 244) !important;
  104. &:focus {
  105. background-color: rgb(233, 233, 233) !important;
  106. }
  107. }
  108. .text .octicon {
  109. width: 16px;
  110. text-align: center;
  111. }
  112. .right.menu {
  113. .menu {
  114. left: auto;
  115. right: 0;
  116. }
  117. .dropdown .menu {
  118. margin-top: 0;
  119. }
  120. }
  121. }
  122. .ui {
  123. &.left {
  124. float: left;
  125. }
  126. &.right {
  127. float: right;
  128. }
  129. &.container {
  130. &.fluid {
  131. &.padded {
  132. padding: 0 10px 0 10px;
  133. }
  134. }
  135. }
  136. &.form {
  137. .ui.button {
  138. font-weight: normal;
  139. }
  140. .box.field {
  141. padding-left: 27px;
  142. }
  143. }
  144. &.menu,
  145. &.vertical.menu,
  146. &.segment {
  147. box-shadow: none;
  148. }
  149. .text {
  150. &.red {
  151. color: #d95c5c !important;
  152. a {
  153. color: #d95c5c !important;
  154. &:hover {
  155. color: #E67777 !important;
  156. }
  157. }
  158. }
  159. &.blue {
  160. color: #428bca !important;
  161. a {
  162. color: #15c !important;
  163. &:hover {
  164. color: #428bca !important;
  165. }
  166. }
  167. }
  168. &.black {
  169. color: #444;
  170. &:hover {
  171. color: #000;
  172. }
  173. }
  174. &.grey {
  175. color: #767676 !important;
  176. a {
  177. color: #444 !important;
  178. &:hover {
  179. color: #000 !important;
  180. }
  181. }
  182. }
  183. &.light.grey {
  184. color: #888 !important;
  185. }
  186. &.green {
  187. color: #6cc644 !important;
  188. }
  189. &.purple {
  190. color: #6e5494 !important;
  191. }
  192. &.yellow {
  193. color: #FBBD08 !important;
  194. }
  195. &.gold {
  196. color: #a1882b !important;
  197. }
  198. &.left {
  199. text-align: left !important;
  200. }
  201. &.right {
  202. text-align: right !important;
  203. }
  204. &.small {
  205. font-size: 0.75em;
  206. }
  207. &.normal {
  208. font-weight: normal;
  209. }
  210. &.bold {
  211. font-weight: bold;
  212. }
  213. &.italic {
  214. font-style: italic;
  215. }
  216. &.truncate {
  217. overflow: hidden;
  218. text-overflow: ellipsis;
  219. white-space: nowrap;
  220. display: inline-block;
  221. }
  222. &.thin {
  223. font-weight: normal;
  224. }
  225. &.middle {
  226. vertical-align: middle;
  227. }
  228. }
  229. .message {
  230. text-align: center;
  231. }
  232. .header > i + .content {
  233. padding-left: 0.75rem;
  234. vertical-align: middle;
  235. }
  236. .warning {
  237. &.header {
  238. background-color: #F9EDBE !important;
  239. border-color: #F0C36D;
  240. }
  241. &.segment {
  242. border-color: #F0C36D;
  243. }
  244. }
  245. .info {
  246. &.segment {
  247. border: 1px solid #c5d5dd;
  248. &.top {
  249. background-color: #e6f1f6 !important;
  250. h3, h4 {
  251. margin-top: 0;
  252. }
  253. h3:last-child {
  254. margin-top: 4px;
  255. }
  256. > :last-child {
  257. margin-bottom: 0;
  258. }
  259. }
  260. }
  261. }
  262. .normal.header {
  263. font-weight: normal;
  264. }
  265. .avatar.image {
  266. border-radius: 3px;
  267. }
  268. .form {
  269. .fake {
  270. display: none !important;
  271. }
  272. .sub.field {
  273. margin-left: 25px;
  274. }
  275. }
  276. .sha.label {
  277. font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace;
  278. font-size: 13px;
  279. padding: 6px 10px 4px 10px;
  280. font-weight: normal;
  281. margin: 0 6px;
  282. }
  283. &.status.buttons {
  284. .octicon {
  285. margin-right: 4px;
  286. }
  287. }
  288. &.inline.delete-button {
  289. padding: 8px 15px;
  290. font-weight: normal;
  291. }
  292. }
  293. .overflow.menu {
  294. .items {
  295. max-height: 300px;
  296. overflow-y: auto;
  297. .item {
  298. position: relative;
  299. cursor: pointer;
  300. display: block;
  301. border: none;
  302. height: auto;
  303. border-top: none;
  304. line-height: 1em;
  305. color: rgba(0,0,0,.8);
  306. padding: .71428571em 1.14285714em !important;
  307. font-size: 1rem;
  308. text-transform: none;
  309. font-weight: 400;
  310. box-shadow: none;
  311. -webkit-touch-callout: none;
  312. &.active {
  313. font-weight: 700;
  314. }
  315. &:hover {
  316. background: rgba(0,0,0,.05);
  317. color: rgba(0,0,0,.8);
  318. z-index: 13;
  319. }
  320. }
  321. }
  322. }
  323. .scrolling.menu {
  324. .item.selected {
  325. font-weight: 700 !important;
  326. }
  327. }
  328. footer {
  329. margin-top: @footer-margin+14px !important;
  330. height: @footer-margin;
  331. background-color: white;
  332. border-top: 1px solid #d6d6d6;
  333. clear: both;
  334. width: 100%;
  335. color: #888888;
  336. .container {
  337. padding-top: 10px;
  338. .fa {
  339. width: 16px;
  340. text-align: center;
  341. color: #428bca;
  342. }
  343. .links >* {
  344. border-left: 1px solid #d6d6d6;
  345. padding-left: 8px;
  346. margin-left: 5px;
  347. &:first-child {
  348. border-left: none;
  349. }
  350. }
  351. }
  352. .ui.language .menu {
  353. max-height: 500px;
  354. overflow-y: auto;
  355. margin-bottom: 7px;
  356. }
  357. }
  358. .hide {
  359. display: none;
  360. }
  361. .display {
  362. &.inline {
  363. display: inline;
  364. }
  365. }
  366. .center {
  367. text-align: center;
  368. }
  369. .no-padding-left {
  370. padding-left: 0 !important;
  371. }
  372. .generate-img(16);
  373. .generate-img(@n, @i: 1) when (@i =< @n) {
  374. .img-@{i} {
  375. width: (2px * @i) !important;
  376. height: (2px * @i) !important;
  377. }
  378. .generate-img(@n, (@i + 1));
  379. }
  380. // Accessibility
  381. .sr-only {
  382. position: absolute;
  383. width: 1px;
  384. height: 1px;
  385. padding: 0;
  386. margin: -1px;
  387. overflow: hidden;
  388. clip: rect(0, 0, 0, 0);
  389. border: 0;
  390. }
  391. .sr-only-focusable:active,
  392. .sr-only-focusable:focus {
  393. position: static;
  394. width: auto;
  395. height: auto;
  396. margin: 0;
  397. overflow: visible;
  398. clip: auto;
  399. }
  400. @media only screen and (max-width: 991px) and (min-width: 768px) {
  401. .ui.container {
  402. width: 95%;
  403. }
  404. }
  405. /* Overrides some styles of the Highlight.js plugin */
  406. .hljs {
  407. background: inherit !important;
  408. padding: 0 !important;
  409. }
  410. // Reset CSS to prevent UI breaks
  411. .ui.dropdown .menu>.item>.image,
  412. .ui.dropdown .menu>.item>img,
  413. .ui.dropdown>.text>.image,
  414. .ui.dropdown>.text>img {
  415. vertical-align: middle;
  416. margin-top: 0;
  417. margin-bottom: 0;
  418. }