toolkit.less 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. // other solution : http://stackoverflow.com/questions/1577598/how-to-hide-parts-of-html-when-javascript-is-disabled/13857783#13857783
  2. html.no-js .hide_if_nojs {
  3. display: none;
  4. }
  5. html.js .show_if_nojs {
  6. display: none;
  7. }
  8. .center {
  9. text-align: center;
  10. }
  11. .right {
  12. float: right ;
  13. }
  14. .left {
  15. float: left;
  16. }
  17. .invisible {
  18. display: none !important;
  19. }
  20. .list-unstyled {
  21. list-style-type: none;
  22. li {
  23. margin-top: 4px;
  24. margin-bottom: 4px;
  25. }
  26. }
  27. .danger {
  28. background-color: @color-error-background;
  29. }
  30. .warning {
  31. background: @color-warning-background;
  32. }
  33. .success {
  34. background: @color-success-background;
  35. }
  36. .badge {
  37. display: inline-block;
  38. color: #fff;
  39. background-color: #777;
  40. text-align: center;
  41. white-space: nowrap;
  42. vertical-align: baseline;
  43. min-width: 10px;
  44. padding: 1px 5px;
  45. border-radius: 5px;
  46. }
  47. // kbd
  48. kbd {
  49. padding: 2px 4px;
  50. margin: 1px;
  51. font-size: 90%;
  52. color: white;
  53. background: black;
  54. }
  55. // table
  56. table {
  57. width: 100%;
  58. &.striped {
  59. tr {
  60. border-bottom: 1px solid @color-settings-tr-hover;
  61. }
  62. }
  63. }
  64. th {
  65. padding: 0.4em;
  66. }
  67. td {
  68. padding: 0 4px;
  69. }
  70. tr {
  71. &:hover {
  72. background: @color-settings-tr-hover;
  73. }
  74. }
  75. // pre
  76. .pre() {
  77. display: block;
  78. font-size: 0.8em;
  79. word-break: break-all;
  80. margin: 0.1em;
  81. .select-all-on-focus();
  82. }
  83. div.selectable_url {
  84. display: block;
  85. border: 1px solid @color-result-search-url-border;
  86. padding: 4px;
  87. color: @color-result-search-url-font;
  88. width: 100%;
  89. display: block;
  90. margin: 0.1em;
  91. overflow: hidden;
  92. height: 1.2em;
  93. line-height: 1.2em;
  94. pre {
  95. .pre();
  96. }
  97. }
  98. // dialog
  99. .dialog() {
  100. position: relative;
  101. width: 70%;
  102. padding: 1em 1em 1em 2.7em;
  103. margin: 0em 8% 1em 8%;
  104. border: 1px solid black;
  105. border-radius: 4px;
  106. text-align: left;
  107. &:before {
  108. position: absolute;
  109. top: 0.5em;
  110. left: 0.5em;
  111. font-family:"ion";
  112. font-size: 1.5em;
  113. }
  114. .close {
  115. float:right;
  116. position: relative;
  117. top: -3px;
  118. color: inherit;
  119. font-size: 1.5em;
  120. }
  121. ul, ol, p {
  122. margin: 1px 0 0 0;
  123. }
  124. table {
  125. width: auto;
  126. }
  127. tr {
  128. vertical-align: text-top;
  129. &:hover {
  130. background: transparent;
  131. }
  132. }
  133. td {
  134. padding: 0 1em 0 0;
  135. }
  136. h4 {
  137. margin-top: 0.3em;
  138. margin-bottom: 0.3em;
  139. }
  140. }
  141. .dialog-error {
  142. .dialog();
  143. color: @color-error;
  144. background: @color-error-background;
  145. border-color: @color-error;
  146. .ion-error();
  147. }
  148. .dialog-warning {
  149. .dialog();
  150. color: @color-warning;
  151. background: @color-warning-background;
  152. border-color: @color-warning;
  153. .ion-warning();
  154. }
  155. .dialog-modal {
  156. .dialog();
  157. background: white;
  158. position: fixed;
  159. top: 50%;
  160. left: 50%;
  161. /* bring your own prefixes */
  162. transform: translate(-50%, -50%);
  163. z-index: 100000;
  164. margin: 0 50% 0 0;
  165. box-shadow: 0 0 1em;
  166. }
  167. // btn-collapse
  168. .btn-collapse {
  169. cursor: pointer;
  170. }
  171. //
  172. .scrollx {
  173. overflow-x: auto;
  174. overflow-y: hidden;
  175. display: block;
  176. padding: 0;
  177. margin: 0;
  178. border: none;
  179. }
  180. /* -- tabs --*/
  181. .tabs .tabs > label {
  182. font-size: 90%;
  183. }
  184. .tabs {
  185. .flexbox();
  186. flex-wrap: wrap;
  187. width: 100%;
  188. min-width: 100%;
  189. & > * {
  190. order: 2;
  191. }
  192. & > input[type=radio] {
  193. display: none;
  194. }
  195. & > label {
  196. order: 1;
  197. padding: 0.7em;
  198. margin: 0 0.7em;
  199. letter-spacing:0.5px;
  200. text-transform: uppercase;
  201. border: solid white;
  202. border-width: 0px 0px 2px 0;
  203. .disable-user-select();
  204. cursor: pointer;
  205. }
  206. & > label:hover {
  207. border-bottom: 2px solid @color-categories-item-border-selected;
  208. }
  209. & > section {
  210. min-width: 100%;
  211. padding: 0.7rem 0;
  212. box-sizing: border-box;
  213. border-top: 1px solid black;
  214. display: none;
  215. }
  216. // default selection
  217. & > label:last-of-type {
  218. border-bottom: 2px solid @color-categories-item-border-selected;
  219. background: @color-categories-item-selected;
  220. color: @color-categories-item-selected-font;
  221. font-weight: bold;
  222. letter-spacing:-0.1px;
  223. }
  224. & > section:last-of-type {
  225. display: block;
  226. }
  227. }
  228. html body .tabs > input:checked {
  229. ~ section {
  230. display: none;
  231. }
  232. ~ label {
  233. position: inherited;
  234. background: inherit;
  235. border-bottom: 2px solid transparent;
  236. font-weight: normal;
  237. color: inherit;
  238. &:hover {
  239. border-bottom: 2px solid @color-categories-item-border-selected;
  240. }
  241. }
  242. + label {
  243. border-bottom: 2px solid @color-categories-item-border-selected;
  244. background: @color-categories-item-selected;
  245. color: @color-categories-item-selected-font;
  246. font-weight: bold;
  247. letter-spacing:-0.1px;
  248. }
  249. + label + section {
  250. display: block;
  251. }
  252. }
  253. /* -- select -- */
  254. select {
  255. height: 28px;
  256. margin: 0 1em 0 0;
  257. padding: 2px 8px 2px 0 !important;
  258. color: @color-search-font;
  259. font-size: 12px;
  260. z-index: 2;
  261. &:hover, &:focus {
  262. cursor: pointer;
  263. }
  264. }
  265. @supports ((background-position-x: 100%) and ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none))) {
  266. select {
  267. appearance: none;
  268. -webkit-appearance: none;
  269. -moz-appearance: none;
  270. border: none;
  271. border-bottom: 1px solid #d7d7d7;
  272. background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat;
  273. background-position-x: 105%;
  274. background-size: 2em;
  275. background-origin: content-box;
  276. outline: medium none;
  277. &:hover, &:focus {
  278. border-bottom: 1px solid @color-search-border;
  279. }
  280. }
  281. }
  282. /* -- checkbox-onoff -- */
  283. @supports (border-radius: 50px) {
  284. .checkbox-onoff {
  285. display: inline-block;
  286. width: 40px;
  287. height: 10px;
  288. background: #dcdcdc;
  289. margin: 8px auto;
  290. position: relative;
  291. border-radius: 50px;
  292. label {
  293. display: block;
  294. width: 20px;
  295. height: 20px;
  296. position: absolute;
  297. top: -5px;
  298. cursor: pointer;
  299. border-radius: 50px;
  300. box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.3);
  301. transition: all 0.4s ease;
  302. left: 27px;
  303. background-color: #3498DB;
  304. }
  305. input[type=checkbox] {
  306. visibility: hidden;
  307. &:checked + label {
  308. left: -5px;
  309. background: #dcdcdc;
  310. }
  311. }
  312. }
  313. }
  314. /* -- checkbox --*/
  315. @supports (transform: rotate(-45deg)) {
  316. .checkbox {
  317. width: 20px;
  318. position: relative;
  319. margin: 20px auto;
  320. label {
  321. width: 20px;
  322. height: 20px;
  323. cursor: pointer;
  324. position: absolute;
  325. top: 0;
  326. left: 0;
  327. background: white;
  328. border-radius: 4px;
  329. box-shadow: inset 0px 1px 1px white, 0px 1px 4px rgba(0,0,0,0.5);
  330. &:after {
  331. content: '';
  332. width: 9px;
  333. height: 5px;
  334. position: absolute;
  335. top: 4px;
  336. left: 4px;
  337. border: 3px solid #333;
  338. border-top: none;
  339. border-right: none;
  340. background: transparent;
  341. opacity: 0;
  342. transform: rotate(-45deg);
  343. }
  344. }
  345. input[type=checkbox] {
  346. visibility: hidden;
  347. &:checked + label:after {
  348. border-color: #3498DB;
  349. opacity: 1;
  350. }
  351. }
  352. // disabled : can''t be focused, show only the check mark
  353. input[disabled] + label {
  354. background-color: transparent !important;
  355. box-shadow: none !important;
  356. cursor: inherit;;
  357. }
  358. // if not checked and possible to checked then display a "light" check mark on hover
  359. input:not(:checked):not([readonly]):not([disabled]) + label:hover::after {
  360. opacity: 0.5;
  361. }
  362. }
  363. }
  364. @media screen and (max-width: 50em) {
  365. .tabs > label {
  366. width: 100%;
  367. }
  368. }
  369. /* -- loader -- */
  370. .loader,
  371. .loader:after {
  372. border-radius: 50%;
  373. width: 2em;
  374. height: 2em;
  375. }
  376. .loader {
  377. margin: 1em auto;
  378. font-size: 10px;
  379. position: relative;
  380. text-indent: -9999em;
  381. border-top: 0.5em solid rgba(0, 0, 0, 0.2);
  382. border-right: 0.5em solid rgba(0, 0, 0, 0.2);
  383. border-bottom: 0.5em solid rgba(0, 0, 0, 0.2);
  384. border-left: 0.5em solid rgba(255, 255, 255, 0);
  385. -webkit-transform: translateZ(0);
  386. -ms-transform: translateZ(0);
  387. transform: translateZ(0);
  388. -webkit-animation: load8 1.2s infinite linear;
  389. animation: load8 1.2s infinite linear;
  390. }
  391. @-webkit-keyframes load8 {
  392. 0% {
  393. -webkit-transform: rotate(0deg);
  394. transform: rotate(0deg);
  395. }
  396. 100% {
  397. -webkit-transform: rotate(360deg);
  398. transform: rotate(360deg);
  399. }
  400. }
  401. @keyframes load8 {
  402. 0% {
  403. -webkit-transform: rotate(0deg);
  404. transform: rotate(0deg);
  405. }
  406. 100% {
  407. -webkit-transform: rotate(360deg);
  408. transform: rotate(360deg);
  409. }
  410. }
  411. /* -- stacked bar chart -- */
  412. .stacked-bar-chart {
  413. margin: 0;
  414. padding: 0 0.125rem 0 4rem;
  415. width: 100%;
  416. width: -moz-available;
  417. width: -webkit-fill-available;
  418. width: fill;
  419. flex-direction: row;
  420. flex-wrap: nowrap;
  421. align-items: center;
  422. display: inline-flex;
  423. }
  424. .stacked-bar-chart-value {
  425. width: 3rem;
  426. display: inline-block;
  427. position: absolute;
  428. padding: 0 0.5rem;
  429. text-align: right;
  430. }
  431. .stacked-bar-chart-base {
  432. display:flex;
  433. flex-shrink: 0;
  434. flex-grow: 0;
  435. flex-basis: unset;
  436. }
  437. .stacked-bar-chart-median {
  438. .stacked-bar-chart-base();
  439. background: @stacked-bar-chart;
  440. border: 1px solid fade(@stacked-bar-chart, 90%);
  441. padding: 0.3rem 0;
  442. }
  443. .stacked-bar-chart-rate80 {
  444. .stacked-bar-chart-base();
  445. background: transparent;
  446. border: 1px solid fade(@stacked-bar-chart, 30%);
  447. padding: 0.3rem 0;
  448. }
  449. .stacked-bar-chart-rate95 {
  450. .stacked-bar-chart-base();
  451. background: transparent;
  452. border-bottom: 1px dotted fade(@stacked-bar-chart, 50%);
  453. padding: 0;
  454. }
  455. .stacked-bar-chart-rate100 {
  456. .stacked-bar-chart-base();
  457. background: transparent;
  458. border-left: 1px solid fade(@stacked-bar-chart, 90%);
  459. padding: 0.4rem 0;
  460. width: 1px;
  461. }