kaiui.less 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. /**
  2. From: https://github.com/nadim1992/KaiUI
  3. * ===========================
  4. * **************** Agenda ***
  5. *1. Basic
  6. *2. Fonts
  7. *3. Header
  8. *4. Separator
  9. *5. Software key
  10. *6. Toast
  11. *7. Lists
  12. *8. Options menu
  13. *9. Button
  14. * 10. Input
  15. * 11. Table
  16. * ===========================
  17. * Default: @themecolor:#320374;
  18. */
  19. @themecolor:#3faa7e;
  20. /* ============== Basic ============== */
  21. h1, h2, h3, h4, h5, ul, p {
  22. margin: 0;
  23. padding: 0;
  24. }
  25. .statusbar-placeholder {
  26. background-color: @themecolor;
  27. height: 26px;
  28. }
  29. #kui-app {
  30. width: 100%;
  31. height: 100%;
  32. font-family: "Open Sans";
  33. padding-top:28px;
  34. padding-bottom:30px;
  35. }
  36. .content-area {
  37. overflow: hidden;
  38. position: relative;
  39. }
  40. .overlay {
  41. width: 100%;
  42. height: 100%;
  43. background: rgba(0,0,0, .7);
  44. position: absolute;
  45. display: none;
  46. }
  47. /* ============== Fonts ============== */
  48. .kui-h1 {
  49. font-size: 17px;
  50. font-weight: 300;
  51. }
  52. .kui-h2 {
  53. font-size: 17px;
  54. font-weight: 600;
  55. }
  56. .kui-h3,
  57. .kui-h4,
  58. .kui-sec {
  59. font-size: 14px;
  60. font-weight: 400;
  61. }
  62. .kui-h5 {
  63. font-size: 14px;
  64. font-weight: 600;
  65. }
  66. .kui-pri,
  67. .kui-text,
  68. .kui-btn,
  69. .kui-link {
  70. font-size: 17px;
  71. font-weight: 400;
  72. }
  73. .kui-thi {
  74. font-size: 12px;
  75. font-weight: 400;
  76. }
  77. /* ============== Header ============== */
  78. .kui-header {
  79. height: 28px;
  80. line-height: 28px;
  81. background-color: @themecolor;
  82. color: #fff;
  83. text-align: center;
  84. position:absolute;
  85. top:0;
  86. width:100%;
  87. overflow-x:hidden;
  88. }
  89. /* ============== Tabs ============== */
  90. .kui-tabs {
  91. padding-left:5px;
  92. margin-right:5px;
  93. list-style-type:none;
  94. overflow:hidden;
  95. white-space:nowrap;
  96. padding-top:5px;
  97. font-size:14px;
  98. margin-bottom:3px;
  99. }
  100. .kui-tabs li {
  101. display:inline-block;
  102. color:#777777;
  103. padding-left:5px;
  104. padding-right:5px;
  105. font-weigt:400;
  106. padding-bottom:2px;
  107. }
  108. .kui-tabs li.active {
  109. border-bottom:3px solid @themecolor;
  110. font-weight:600;
  111. color:#000000;
  112. }
  113. /* ============== Separator ============== */
  114. .kui-separator {
  115. color: #6a6a6a;
  116. height: 28px;
  117. background-color: #e6e6e6;
  118. line-height: 28px;
  119. padding-left: 10px;
  120. }
  121. /* ============== Software key ============== */
  122. .kui-software-key {
  123. height: 30px;
  124. background-color: #cccccc;
  125. display: flex;
  126. align-items: center;
  127. padding: 0 5px;
  128. color: #323232;
  129. position:absolute;
  130. bottom:0;
  131. width:~"calc(100% - 10px)";
  132. }
  133. .kui-software-key h5 {
  134. width:inherit;
  135. }
  136. .kui-software-key h5:first-child {
  137. text-align: left;
  138. overflow:hidden;
  139. }
  140. .kui-key-mid {
  141. font-size: 16px;
  142. font-weight: 700;
  143. text-align: center;
  144. text-transform: uppercase;
  145. }
  146. .kui-software-key h5:last-child {
  147. text-align: right;
  148. overflow:hidden;
  149. }
  150. /* ============== Toast ============== */
  151. .kui-toast {
  152. width:100%;
  153. color: #fff;
  154. text-align: center;
  155. position:fixed;
  156. top:0;
  157. }
  158. .kui-toast .kui-pri {
  159. background-color: #323232;
  160. margin-bottom:0;
  161. padding-bottom:5px;
  162. }
  163. .kui-toast-shadow {
  164. height: 6px;
  165. background-image: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 100%);
  166. }
  167. /* ============== Lists ============== */
  168. .kui-list {
  169. list-style: none;
  170. }
  171. .kui-list li {
  172. background-color: #fff;
  173. height: 60px;
  174. display: flex;
  175. align-items: center;
  176. padding: 0 10px;
  177. }
  178. .kui-list li.large {
  179. padding-top:10px;
  180. padding-bottom:10px;
  181. }
  182. .kui-list li .kui-list-img {
  183. width: 32px;
  184. height: 32px;
  185. border-radius: 10px;
  186. background-color: #2f3235;
  187. margin-right: 10px;
  188. }
  189. .kui-list-cont {
  190. width:100%;
  191. }
  192. .kui-list-cont p {
  193. margin: 4px 0;
  194. }
  195. .kui-list-cont .kui-pri {
  196. color: #323232;
  197. }
  198. .kui-list-cont .kui-sec,
  199. .kui-list-cont .kui-thi {
  200. color: #6a6a6a;
  201. }
  202. .kui-list li:focus {
  203. background-color: @themecolor;
  204. outline: 0;
  205. }
  206. .kui-list li:focus .kui-pri,
  207. .kui-list li:focus .kui-sec,
  208. .kui-list li:focus .kui-thi {
  209. color: #fff;
  210. }
  211. /* ============== Options menu ============== */
  212. .kui-option-menu {
  213. width: 100%;
  214. position: absolute;
  215. overflow: hidden;
  216. bottom: 0;
  217. display: none;
  218. }
  219. .kui-option-menu .kui-option-title {
  220. margin: 0;
  221. color: #323232;
  222. text-align: center;
  223. background-color: #d8d8d8;
  224. height: 28px;
  225. line-height: 28px;
  226. }
  227. .kui-options {
  228. list-style: none;
  229. margin: 0;
  230. padding: 0;
  231. overflow: hidden;
  232. }
  233. .kui-options li {
  234. height: 50px;
  235. line-height: 50px;
  236. padding-left: 10px;
  237. background-color: #fff;
  238. }
  239. .kui-options li:focus {
  240. outline: 0;
  241. color: #fff;
  242. background-color: @themecolor;
  243. }
  244. /* ============== Button ============== */
  245. button.kui-btn {
  246. width: 220px;
  247. height: 36px;
  248. border-radius: 2px;
  249. background: #ccc;
  250. text-align: center;
  251. color: #323232;
  252. border: 0;
  253. display: block;
  254. margin: auto;
  255. }
  256. button.kui-btn:focus {
  257. outline: 0;
  258. color: #fff;
  259. background-color: @themecolor;
  260. }
  261. /* ============== Input ============== */
  262. .kui-input-holder {
  263. height: 76px;
  264. padding: 10px;
  265. background-color: #fff;
  266. }
  267. .kui-input-holder.kui-focus-within {
  268. background-color: @themecolor;
  269. outline: 0;
  270. }
  271. .kui-input-label {
  272. color: #323232;
  273. display: block;
  274. padding-bottom: 10px;
  275. }
  276. .kui-input-holder.kui-focus-within .kui-input-label {
  277. color: #fff;
  278. }
  279. .kui-input {
  280. height: 36px;
  281. width: 100%;
  282. border-radius: 2px;
  283. padding-left: 10px;
  284. -moz-box-sizing: border-box;
  285. box-sizing: border-box;
  286. border: 1px solid #aaaaaa;
  287. }
  288. .kui-input ::-moz-placeholder,
  289. .kui-input :-moz-placeholder {
  290. color: #323232;
  291. }
  292. .kui-input:focus {
  293. outline: 0;
  294. }
  295. /* ============== Radio and Checkbox ============== */
  296. .kui-radio,.kui-checkbox {
  297. display: none;
  298. }
  299. .kui-radio + label::before,
  300. .kui-checkbox + label::before {
  301. content:"";
  302. background-size:cover;
  303. height: 20px;
  304. width: 20px;
  305. display:inline-block;
  306. float:right;
  307. }
  308. .kui-radio + label::before {
  309. background-image:url(/img/icon-circle-black.svg);
  310. }
  311. .kui-radio:checked + label::before {
  312. background-image:url(/img/icon-c-check-black.svg);
  313. }
  314. li:focus .kui-radio + label::before {
  315. background-image:url(/img/icon-circle-white.svg);
  316. }
  317. li:focus .kui-radio:checked + label::before {
  318. background-image:url(/img/icon-c-check-white.svg);
  319. }
  320. .kui-checkbox + label::before {
  321. background-image:url(/img/icon-square-black.svg);
  322. }
  323. .kui-checkbox:checked + label::before {
  324. background-image:url(/img/icon-s-check-black.svg);
  325. }
  326. li:focus .kui-checkbox + label::before {
  327. background-image:url(/img/icon-square-white.svg);
  328. }
  329. li:focus .kui-checkbox:checked + label::before {
  330. background-image:url(/img/icon-s-check-white.svg);
  331. }
  332. /* ============== Table ============== */
  333. .kui-table,
  334. .kui-table th,
  335. .kui-table td {
  336. border: 1px solid @themecolor;
  337. border-collapse: collapse;
  338. }
  339. .kui-table {
  340. width: 100%;
  341. }
  342. .kui-table thead {
  343. background-color: @themecolor;
  344. color: #fff;
  345. }
  346. .kui-table tr:focus {
  347. outline: 0;
  348. background-color: @themecolor;
  349. color: #fff;
  350. }
  351. .kui-table td {
  352. width: 50%;
  353. padding: 4px 5px;
  354. }
  355. .kui-table td:last-child {
  356. text-align: right;
  357. }
  358. /* KaiOS portrait devices (240x320) */
  359. @media only screen and (orientation : portrait) {
  360. .content-area {
  361. height: 236px;
  362. }
  363. .kui-option-menu {
  364. height: 178px;
  365. }
  366. .kui-options {
  367. height: 150px;
  368. }
  369. }
  370. /* KaiOS landscape devices (320x240) */
  371. @media screen and (orientation: landscape) {
  372. .content-area {
  373. height: 156px;
  374. }
  375. .kui-option-menu {
  376. height: 128px;
  377. }
  378. .kui-options {
  379. height: 100px;
  380. }
  381. }
  382. /*** The End ******/