site.css 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. body {
  2. font-family: 'Helvetica Neue', Verdana, Helvetica, Arial, sans-serif;
  3. max-width: 600px;
  4. margin: 0 auto;
  5. padding-top: 72px;
  6. -webkit-font-smoothing: antialiased;
  7. font-size: 1.125em;
  8. color: #333;
  9. line-height: 1.5em;
  10. overflow: hidden;
  11. }
  12. h1, h2, h3 {
  13. color: #000;
  14. }
  15. h1 {
  16. font-size: 2.5em
  17. }
  18. h2 {
  19. font-size: 2em
  20. }
  21. h3 {
  22. font-size: 1.5em
  23. }
  24. a {
  25. text-decoration: none;
  26. color: #09f;
  27. }
  28. a:hover {
  29. text-decoration: underline;
  30. }
  31. #main-table {
  32. position: fixed;
  33. top: 0;
  34. left: 0;
  35. }
  36. table {
  37. border-collapse: collapse;
  38. }
  39. td, th {
  40. border: 1px solid black;
  41. padding: 0;
  42. }
  43. th {
  44. text-align: center;
  45. min-width: 40px;
  46. }
  47. td {
  48. text-align: right;
  49. position: relative;
  50. }
  51. td input {
  52. border: none;
  53. padding: 5px;
  54. width: 80px;
  55. }
  56. td input:hover {
  57. background-color: #ccc;
  58. }
  59. td input:focus {
  60. background-color: #ccf;
  61. }
  62. td input:not(:focus) {
  63. text-align: right;
  64. }
  65. #controls {
  66. --controls-width: 75px;
  67. --controls-padding: 5px;
  68. --controls-opener-width: 15px;
  69. }
  70. #controls > div, #controls > button {
  71. position: fixed;
  72. overflow: hidden;
  73. }
  74. /* TODO: design square logo for microtables */
  75. #main-logo {
  76. background-color: lightblue;
  77. z-index: 999;
  78. left: 0;
  79. bottom: 0;
  80. padding: var(--controls-padding);
  81. height: var(--controls-width);
  82. width: var(--controls-width);
  83. font-size: xxx-large;
  84. font-weight: bold;
  85. text-align: center;
  86. }
  87. #main-logo > img {
  88. width: 100%;
  89. height:100%;
  90. }
  91. #left-controls-button {
  92. left: 0;
  93. width: calc(var(--controls-width) + 2 * var(--controls-padding));
  94. height: var(--controls-opener-width);
  95. z-index: 999;
  96. bottom: calc(var(--controls-width) + 2 * var(--controls-padding));
  97. }
  98. #bottom-controls-button {
  99. bottom: 0;
  100. height: calc(var(--controls-width) + 2 * var(--controls-padding));
  101. width: var(--controls-opener-width);
  102. z-index: 999;
  103. left: calc(var(--controls-width) + 2 * var(--controls-padding));
  104. }
  105. #controls-left {
  106. background-color: pink;
  107. z-index: 998;
  108. top: 0;
  109. left: calc(-1 * var(--controls-width) - 2 * var(--controls-padding));
  110. padding: 5px;
  111. height: calc(100vh - var(--controls-padding));
  112. width: var(--controls-width);
  113. }
  114. /*TODO: link left controls with position of the whole table*/
  115. #controls-left.open {
  116. left: 0;
  117. }
  118. #controls-bottom {
  119. background-color: lightblue;
  120. z-index: 998;
  121. left: 0;
  122. bottom: calc(-1 * var(--controls-width) - 2 * var(--controls-padding));
  123. height: var(--controls-width);
  124. padding: var(--controls-padding);
  125. padding-left: calc(var(--controls-width) + 3 * var(--controls-padding) + var(--controls-opener-width));
  126. width: calc(100vw - var(--controls-width) - 4 * var(--controls-padding) - var(--controls-opener-width));
  127. }
  128. #controls-bottom.open {
  129. bottom: 0;
  130. }
  131. .smartborder {
  132. width: calc(100% + 2px);
  133. height: calc(100% + 2px);
  134. border: 3px solid blue;
  135. position: absolute;
  136. left: -4px;
  137. top: -4px;
  138. background: none;
  139. z-index: 999;
  140. /*pointer-events: none;*/
  141. }
  142. td input:not(:focus) + .smartborder {
  143. visibility: hidden;
  144. }
  145. .smartborder .button {
  146. --button-size: 20px;
  147. --half-button-size: 10px;
  148. /*pointer-events: all;/* TODO check this (what is "initial"?) */
  149. width: var(--button-size);
  150. height: var(--button-size);
  151. background-color: blue;
  152. color: white;
  153. border-radius: var(--half-button-size);
  154. position: absolute;
  155. }
  156. .extendrange.button {
  157. left: 100%;
  158. top: 100%;
  159. }
  160. .fillrange.button {
  161. top: 100%;
  162. left: calc(50% - var(--half-button-size));
  163. }
  164. .moverange.button {
  165. top: calc(50% - var(--half-button-size));
  166. left: calc(0px - var(--button-size));
  167. }
  168. .emptyrange.button {
  169. top: calc(0px - var(--button-size));
  170. left: calc(100% - var(--button-size) - 5px);
  171. }
  172. .deleterange.button {
  173. top: calc(0px - var(--button-size));
  174. left: 100%;
  175. }
  176. .copyrange.button {
  177. top: calc(0px - var(--button-size));
  178. left: 0;
  179. }