base.less 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  1. @font-family-base: 'Rubik', 'Avenir Next', 'Helvetica Neue', sans-serif;
  2. @font-family-code: 'IBM Plex', Consolas, 'Courier New', monospace;
  3. * {
  4. box-sizing: border-box;
  5. }
  6. *:before,
  7. *:after {
  8. box-sizing: border-box;
  9. }
  10. html {
  11. font-family: sans-serif;
  12. font-size: 10px;
  13. -ms-text-size-adjust: 100%;
  14. -webkit-text-size-adjust: 100%;
  15. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  16. height: 100%;
  17. }
  18. body {
  19. font-family: @font-family-base;
  20. margin: 0;
  21. font-size: 16px;
  22. line-height: 24px;
  23. color: @gray-darker;
  24. background: @white-dark;
  25. -webkit-font-smoothing: antialiased;
  26. overflow-x: hidden;
  27. min-height: 100vh;
  28. }
  29. h1,
  30. h2,
  31. h3,
  32. h4,
  33. h5,
  34. h6 {
  35. margin: 0 0 20px;
  36. line-height: 1.2;
  37. font-weight: 600;
  38. }
  39. h1 {
  40. font-size: 3.2rem;
  41. }
  42. h2 {
  43. font-size: 2.8rem;
  44. }
  45. h3 {
  46. font-size: 2.4rem;
  47. }
  48. h4 {
  49. font-size: 2rem;
  50. }
  51. h5 {
  52. font-size: 1.8rem;
  53. }
  54. h6 {
  55. font-size: 1.4rem;
  56. }
  57. dl {
  58. margin-top: 0; // Remove browser default
  59. margin-bottom: @line-height-computed;
  60. }
  61. dt,
  62. dd {
  63. line-height: @line-height-base;
  64. }
  65. dt {
  66. font-weight: 700;
  67. }
  68. dd {
  69. margin-left: 0; // Undo browser default
  70. }
  71. ul,
  72. ol {
  73. margin-top: 0;
  74. margin-bottom: (@line-height-computed / 2);
  75. padding: 0 0 0 20px;
  76. ul,
  77. ol {
  78. margin-bottom: 0;
  79. }
  80. }
  81. p,
  82. pre {
  83. margin: 0 0 20px;
  84. }
  85. ul,
  86. ol {
  87. margin: 0 0 20px;
  88. }
  89. p,
  90. ul,
  91. ol,
  92. blockquote {
  93. padding-top: 0;
  94. margin-top: 0;
  95. line-height: 1.5;
  96. }
  97. input,
  98. button,
  99. select,
  100. textarea {
  101. font-family: inherit;
  102. font-size: inherit;
  103. line-height: inherit;
  104. }
  105. //
  106. // Scaffolding
  107. // --------------------------------------------------
  108. // Reset the box-sizing
  109. //
  110. // Heads up! This reset may cause conflicts with some third-party widgets.
  111. // For recommendations on resolving such conflicts, see
  112. // https://getbootstrap.com/docs/3.4/getting-started/#third-box-sizing
  113. // Reset fonts for relevant elements
  114. input,
  115. button,
  116. select,
  117. textarea {
  118. font-family: inherit;
  119. font-size: inherit;
  120. line-height: inherit;
  121. }
  122. a {
  123. cursor: pointer;
  124. transition: color linear 0.2s;
  125. color: @link-color;
  126. text-decoration: none;
  127. &:hover,
  128. &:focus {
  129. color: @link-hover-color;
  130. text-decoration: none;
  131. }
  132. &:focus {
  133. .tab-focus();
  134. text-decoration: none;
  135. }
  136. }
  137. // Figures
  138. //
  139. // We reset this here because previously Normalize had no `figure` margins. This
  140. // ensures we don't break anyone's use of the element.
  141. figure {
  142. margin: 0;
  143. }
  144. img {
  145. vertical-align: middle;
  146. max-width: 100%;
  147. }
  148. /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
  149. //
  150. // 1. Set default font family to sans-serif.
  151. // 2. Prevent iOS and IE text size adjust after device orientation change,
  152. // without disabling user zoom.
  153. //
  154. //
  155. // Remove default margin.
  156. //
  157. // HTML5 display definitions
  158. // ==========================================================================
  159. //
  160. // Correct `block` display not defined for any HTML5 element in IE 8/9.
  161. // Correct `block` display not defined for `details` or `summary` in IE 10/11
  162. // and Firefox.
  163. // Correct `block` display not defined for `main` in IE 11.
  164. //
  165. article,
  166. aside,
  167. details,
  168. figcaption,
  169. figure,
  170. footer,
  171. header,
  172. hgroup,
  173. main,
  174. menu,
  175. nav,
  176. section,
  177. summary {
  178. display: block;
  179. }
  180. //
  181. // 1. Correct `inline-block` display not defined in IE 8/9.
  182. // 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
  183. //
  184. audio,
  185. canvas,
  186. progress,
  187. video {
  188. display: inline-block; // 1
  189. vertical-align: baseline; // 2
  190. }
  191. //
  192. // Prevent modern browsers from displaying `audio` without controls.
  193. // Remove excess height in iOS 5 devices.
  194. //
  195. audio:not([controls]) {
  196. display: none;
  197. height: 0;
  198. }
  199. //
  200. // Address `[hidden]` styling not present in IE 8/9/10.
  201. // Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
  202. //
  203. [hidden],
  204. template {
  205. display: none;
  206. }
  207. // Links
  208. // ==========================================================================
  209. //
  210. // Remove the gray background color from active links in IE 10.
  211. //
  212. a {
  213. background-color: transparent;
  214. }
  215. //
  216. // Improve readability of focused elements when they are also in an
  217. // active/hover state.
  218. //
  219. a:active,
  220. a:hover {
  221. outline: 0;
  222. }
  223. // Text-level semantics
  224. // ==========================================================================
  225. //
  226. // 1. Remove the bottom border in Chrome 57- and Firefox 39-.
  227. // 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
  228. //
  229. abbr[title] {
  230. border-bottom: none; // 1
  231. text-decoration: underline; // 2
  232. text-decoration: underline dotted; // 2
  233. }
  234. b,
  235. strong {
  236. font-weight: bold;
  237. }
  238. dfn {
  239. font-style: italic;
  240. }
  241. mark {
  242. background: #ff0;
  243. color: #000;
  244. }
  245. small {
  246. font-size: 14px;
  247. }
  248. //
  249. // Prevent `sub` and `sup` affecting `line-height` in all browsers.
  250. //
  251. sub,
  252. sup {
  253. font-size: 75%;
  254. line-height: 0;
  255. position: relative;
  256. vertical-align: baseline;
  257. }
  258. sup {
  259. top: -0.5em;
  260. }
  261. sub {
  262. bottom: -0.25em;
  263. }
  264. // Embedded content
  265. // ==========================================================================
  266. //
  267. // Remove border when inside `a` element in IE 8/9/10.
  268. //
  269. img {
  270. border: 0;
  271. }
  272. //
  273. // Correct overflow not hidden in IE 9/10/11.
  274. //
  275. svg:not(:root) {
  276. overflow: hidden;
  277. }
  278. // Grouping content
  279. // ==========================================================================
  280. hr {
  281. box-sizing: content-box;
  282. height: 0;
  283. }
  284. //
  285. // Code (inline and block)
  286. // --------------------------------------------------
  287. // Inline and block code styles
  288. code,
  289. kbd,
  290. pre,
  291. samp {
  292. font-family: @font-family-monospace;
  293. font-size: 1em;
  294. }
  295. // Inline code
  296. code {
  297. padding: 2px 4px;
  298. font-size: 90%;
  299. color: @code-color;
  300. background-color: @code-bg;
  301. border-radius: @border-radius-base;
  302. }
  303. // User input typically entered via keyboard
  304. kbd {
  305. padding: 2px 4px;
  306. font-size: 90%;
  307. color: @kbd-color;
  308. background-color: @kbd-bg;
  309. border-radius: @border-radius-small;
  310. box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
  311. kbd {
  312. padding: 0;
  313. font-size: 100%;
  314. font-weight: 700;
  315. box-shadow: none;
  316. }
  317. }
  318. pre,
  319. code {
  320. border: 0;
  321. background-color: @white-darker;
  322. color: @gray-darker;
  323. border-radius: 3px;
  324. }
  325. pre {
  326. display: block;
  327. padding: ((@line-height-computed - 1) / 2);
  328. font-size: (@font-size-base - 1); // 14px to 13px
  329. line-height: @line-height-base;
  330. color: @pre-color;
  331. word-break: break-all;
  332. white-space: pre-wrap;
  333. word-wrap: break-word;
  334. background-color: @pre-bg;
  335. border-radius: @border-radius-base;
  336. overflow: auto;
  337. // Account for some code outputs that place code tags in pre tags
  338. code {
  339. padding: 0;
  340. font-size: inherit;
  341. color: inherit;
  342. white-space: pre-wrap;
  343. background-color: transparent;
  344. border-radius: 0;
  345. }
  346. }
  347. // Forms
  348. // ==========================================================================
  349. // 1. Correct color not being inherited.
  350. // Known issue: affects color of disabled elements.
  351. // 2. Correct font properties not being inherited.
  352. // 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
  353. //
  354. button,
  355. input,
  356. optgroup,
  357. select,
  358. textarea {
  359. color: inherit; // 1
  360. font: inherit; // 2
  361. margin: 0; // 3
  362. }
  363. //
  364. // Address inconsistent `text-transform` inheritance for `button` and `select`.
  365. // All other form control elements do not inherit `text-transform` values.
  366. // Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
  367. // Correct `select` style inheritance in Firefox.
  368. //
  369. button {
  370. overflow: visible;
  371. }
  372. button,
  373. select {
  374. text-transform: none;
  375. }
  376. //
  377. // 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
  378. // and `video` controls.
  379. // 2. Correct inability to style clickable `input` types in iOS.
  380. // 3. Improve usability and consistency of cursor style between image-type
  381. // `input` and others.
  382. //
  383. button,
  384. html input[type="button"], // 1
  385. input[type="reset"],
  386. input[type="submit"] {
  387. -webkit-appearance: button; // 2
  388. cursor: pointer; // 3
  389. }
  390. //
  391. // Re-set default cursor for disabled elements.
  392. //
  393. button[disabled],
  394. html input[disabled] {
  395. cursor: default;
  396. }
  397. //
  398. // Remove inner padding and border in Firefox 4+.
  399. //
  400. button::-moz-focus-inner,
  401. input::-moz-focus-inner {
  402. border: 0;
  403. padding: 0;
  404. }
  405. //
  406. // It's recommended that you don't attempt to style these elements.
  407. // Firefox's implementation doesn't respect box-sizing, padding, or width.
  408. //
  409. // 1. Address box sizing set to `content-box` in IE 8/9/10.
  410. // 2. Remove excess padding in IE 8/9/10.
  411. //
  412. input[type='checkbox'],
  413. input[type='radio'] {
  414. box-sizing: border-box; // 1
  415. padding: 0; // 2
  416. }
  417. //
  418. // Fix the cursor style for Chrome's increment/decrement buttons. For certain
  419. // `font-size` values of the `input`, it causes the cursor style of the
  420. // decrement button to change from `default` to `text`.
  421. //
  422. input[type='number']::-webkit-inner-spin-button,
  423. input[type='number']::-webkit-outer-spin-button {
  424. height: auto;
  425. }
  426. //
  427. // 1. Address `appearance` set to `searchfield` in Safari and Chrome.
  428. // 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
  429. //
  430. input[type='search'] {
  431. -webkit-appearance: textfield; // 1
  432. box-sizing: content-box; //2
  433. }
  434. //
  435. // Remove inner padding and search cancel button in Safari and Chrome on OS X.
  436. // Safari (but not Chrome) clips the cancel button when the search input has
  437. // padding (and `textfield` appearance).
  438. //
  439. input[type='search']::-webkit-search-cancel-button,
  440. input[type='search']::-webkit-search-decoration {
  441. -webkit-appearance: none;
  442. }
  443. //
  444. // Define consistent border, margin, and padding.
  445. //
  446. fieldset {
  447. border: 1px solid #c0c0c0;
  448. margin: 0 2px;
  449. padding: 0.35em 0.625em 0.75em;
  450. }
  451. //
  452. // 1. Correct `color` not being inherited in IE 8/9/10/11.
  453. // 2. Remove padding so people aren't caught out if they zero out fieldsets.
  454. //
  455. legend {
  456. border: 0; // 1
  457. padding: 0; // 2
  458. }
  459. //
  460. // Remove default vertical scrollbar in IE 8/9/10/11.
  461. //
  462. textarea {
  463. overflow: auto;
  464. }
  465. //
  466. // Don't inherit the `font-weight` (applied by a rule above).
  467. // NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
  468. //
  469. optgroup {
  470. font-weight: bold;
  471. }
  472. // Tables
  473. // ==========================================================================
  474. table {
  475. border-collapse: collapse;
  476. border-spacing: 0;
  477. margin: 0 0 20px;
  478. }
  479. td,
  480. th {
  481. padding: 0;
  482. }