toolkit.less 10 KB

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