_base.less 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  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. }
  74. .brand .ui.mini.image {
  75. width: 30px;
  76. }
  77. .top.menu a.item:hover,
  78. .top.menu .dropdown.item:hover,
  79. .top.menu .dropdown.item.active {
  80. background-color: transparent;
  81. }
  82. .top.menu a.item:hover {
  83. color: rgba(0,0,0,.45);
  84. }
  85. .top.menu .menu {
  86. z-index: 900;
  87. }
  88. .icon,
  89. .octicon {
  90. margin-right: 5px !important;
  91. }
  92. .head.link.item {
  93. padding-right: 0 !important;
  94. }
  95. .avatar > .ui.image {
  96. margin-right: 0;
  97. }
  98. .avatar .octicon-triangle-down {
  99. margin-top: 6.5px;
  100. }
  101. .searchbox {
  102. background-color: rgb(244, 244, 244) !important;
  103. &:focus {
  104. background-color: rgb(233, 233, 233) !important;
  105. }
  106. }
  107. .text .octicon {
  108. width: 16px;
  109. text-align: center;
  110. }
  111. .right.menu {
  112. .menu {
  113. left: auto;
  114. right: 0;
  115. }
  116. .dropdown .menu {
  117. margin-top: 0;
  118. }
  119. }
  120. }
  121. .ui {
  122. &.left {
  123. float: left;
  124. }
  125. &.right {
  126. float: right;
  127. }
  128. &.container {
  129. &.fluid {
  130. &.padded {
  131. padding: 0 10px 0 10px;
  132. }
  133. }
  134. }
  135. &.form {
  136. .ui.button {
  137. font-weight: normal;
  138. }
  139. .box.field {
  140. padding-left: 27px;
  141. }
  142. }
  143. &.menu,
  144. &.vertical.menu,
  145. &.segment {
  146. box-shadow: none;
  147. }
  148. .text {
  149. &.red {
  150. color: #d95c5c !important;
  151. a {
  152. color: #d95c5c !important;
  153. &:hover {
  154. color: #E67777 !important;
  155. }
  156. }
  157. }
  158. &.blue {
  159. color: #428bca !important;
  160. a {
  161. color: #15c !important;
  162. &:hover {
  163. color: #428bca !important;
  164. }
  165. }
  166. }
  167. &.black {
  168. color: #444;
  169. &:hover {
  170. color: #000;
  171. }
  172. }
  173. &.grey {
  174. color: #767676 !important;
  175. a {
  176. color: #444 !important;
  177. &:hover {
  178. color: #000 !important;
  179. }
  180. }
  181. }
  182. &.light.grey {
  183. color: #888 !important;
  184. }
  185. &.green {
  186. color: #6cc644 !important;
  187. }
  188. &.purple {
  189. color: #6e5494 !important;
  190. }
  191. &.yellow {
  192. color: #FBBD08 !important;
  193. }
  194. &.gold {
  195. color: #a1882b !important;
  196. }
  197. &.left {
  198. text-align: left !important;
  199. }
  200. &.right {
  201. text-align: right !important;
  202. }
  203. &.small {
  204. font-size: 0.75em;
  205. }
  206. &.normal {
  207. font-weight: normal;
  208. }
  209. &.bold {
  210. font-weight: bold;
  211. }
  212. &.italic {
  213. font-style: italic;
  214. }
  215. &.truncate {
  216. overflow: hidden;
  217. text-overflow: ellipsis;
  218. white-space: nowrap;
  219. display: inline-block;
  220. }
  221. &.thin {
  222. font-weight: normal;
  223. }
  224. &.middle {
  225. vertical-align: middle;
  226. }
  227. }
  228. .message {
  229. text-align: center;
  230. }
  231. .header > i + .content {
  232. padding-left: 0.75rem;
  233. vertical-align: middle;
  234. }
  235. .warning {
  236. &.header {
  237. background-color: #F9EDBE !important;
  238. border-color: #F0C36D;
  239. }
  240. &.segment {
  241. border-color: #F0C36D;
  242. }
  243. }
  244. .info {
  245. &.segment {
  246. border: 1px solid #c5d5dd;
  247. &.top {
  248. background-color: #e6f1f6 !important;
  249. h3, h4 {
  250. margin-top: 0;
  251. }
  252. h3:last-child {
  253. margin-top: 4px;
  254. }
  255. > :last-child {
  256. margin-bottom: 0;
  257. }
  258. }
  259. }
  260. }
  261. .normal.header {
  262. font-weight: normal;
  263. }
  264. .avatar.image {
  265. border-radius: 3px;
  266. }
  267. .form {
  268. .fake {
  269. display: none !important;
  270. }
  271. .sub.field {
  272. margin-left: 25px;
  273. }
  274. }
  275. .sha.label {
  276. font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace;
  277. font-size: 13px;
  278. padding: 6px 10px 4px 10px;
  279. font-weight: normal;
  280. margin: 0 6px;
  281. }
  282. &.status.buttons {
  283. .octicon {
  284. margin-right: 4px;
  285. }
  286. }
  287. &.inline.delete-button {
  288. padding: 8px 15px;
  289. font-weight: normal;
  290. }
  291. }
  292. .overflow.menu {
  293. .items {
  294. max-height: 300px;
  295. overflow-y: auto;
  296. .item {
  297. position: relative;
  298. cursor: pointer;
  299. display: block;
  300. border: none;
  301. height: auto;
  302. border-top: none;
  303. line-height: 1em;
  304. color: rgba(0,0,0,.8);
  305. padding: .71428571em 1.14285714em !important;
  306. font-size: 1rem;
  307. text-transform: none;
  308. font-weight: 400;
  309. box-shadow: none;
  310. -webkit-touch-callout: none;
  311. &.active {
  312. font-weight: 700;
  313. }
  314. &:hover {
  315. background: rgba(0,0,0,.05);
  316. color: rgba(0,0,0,.8);
  317. z-index: 13;
  318. }
  319. }
  320. }
  321. }
  322. .scrolling.menu {
  323. .item.selected {
  324. font-weight: 700 !important;
  325. }
  326. }
  327. footer {
  328. margin-top: @footer-margin+14px !important;
  329. height: @footer-margin;
  330. background-color: white;
  331. border-top: 1px solid #d6d6d6;
  332. clear: both;
  333. width: 100%;
  334. color: #888888;
  335. .container {
  336. padding-top: 10px;
  337. .fa {
  338. width: 16px;
  339. text-align: center;
  340. color: #428bca;
  341. }
  342. .links >* {
  343. border-left: 1px solid #d6d6d6;
  344. padding-left: 8px;
  345. margin-left: 5px;
  346. &:first-child {
  347. border-left: none;
  348. }
  349. }
  350. }
  351. .ui.language .menu {
  352. max-height: 500px;
  353. overflow-y: auto;
  354. margin-bottom: 7px;
  355. }
  356. }
  357. .hide {
  358. display: none;
  359. }
  360. .center {
  361. text-align: center;
  362. }
  363. .generate-img(16);
  364. .generate-img(@n, @i: 1) when (@i =< @n) {
  365. .img-@{i} {
  366. width: (2px * @i) !important;
  367. height: (2px * @i) !important;
  368. }
  369. .generate-img(@n, (@i + 1));
  370. }
  371. // Accessibility
  372. .sr-only {
  373. position: absolute;
  374. width: 1px;
  375. height: 1px;
  376. padding: 0;
  377. margin: -1px;
  378. overflow: hidden;
  379. clip: rect(0, 0, 0, 0);
  380. border: 0;
  381. }
  382. .sr-only-focusable:active,
  383. .sr-only-focusable:focus {
  384. position: static;
  385. width: auto;
  386. height: auto;
  387. margin: 0;
  388. overflow: visible;
  389. clip: auto;
  390. }
  391. @media only screen and (max-width: 991px) and (min-width: 768px) {
  392. .ui.container {
  393. width: 95%;
  394. }
  395. }
  396. /* Overrides some styles of the Highlight.js plugin */
  397. .hljs {
  398. background: inherit !important;
  399. padding: 0 !important;
  400. }
  401. // Reset CSS to prevent UI breaks
  402. .ui.dropdown .menu>.item>.image,
  403. .ui.dropdown .menu>.item>img,
  404. .ui.dropdown>.text>.image,
  405. .ui.dropdown>.text>img {
  406. vertical-align: middle;
  407. margin-top: 0;
  408. margin-bottom: 0;
  409. }