voice-graph.css 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. /* Voice Graph */
  2. * {
  3. --voice-graph-z-index: 0;
  4. }
  5. voice-graph-2d {
  6. display: block;
  7. --padding: 2em;
  8. }
  9. voice-graph-2d > canvas {
  10. position: relative;
  11. height: 100%;
  12. width: 100%;
  13. float: left;
  14. }
  15. voice-graph-2d {
  16. padding: var(--padding);
  17. overflow: hidden;
  18. }
  19. voice-graph-2d > .axis-labels {
  20. display: flex;
  21. justify-content: space-between;
  22. position: absolute;
  23. line-height: var(--padding);
  24. }
  25. voice-graph-2d > .axis-labels > .title {
  26. font-weight: bold;
  27. }
  28. voice-graph-2d > .x.axis-labels {
  29. top: 0px;
  30. left: var(--padding);
  31. right: var(--padding);
  32. }
  33. voice-graph-2d > .x-opposite.axis-labels {
  34. bottom: 0px;
  35. left: var(--padding);
  36. right: var(--padding);
  37. }
  38. .current-value {
  39. z-index: calc(var(--voice-graph-z-index) + 3);
  40. text-shadow: var(--body-background) 0px 1px, var(--body-background) 0px -1px, var(--body-background) 1px 0px, var(--body-background) -1px 0px;
  41. }
  42. voice-graph-2d > .y-opposite.axis-labels {
  43. top: var(--padding);
  44. bottom: var(--padding);
  45. left: 0px;
  46. writing-mode: vertical-rl;
  47. text-orientation: mixed;
  48. }
  49. voice-graph-2d > .y.axis-labels {
  50. top: var(--padding);
  51. bottom: var(--padding);
  52. right: 0px;
  53. writing-mode: vertical-lr;
  54. text-orientation: sideways-left;
  55. }
  56. voice-graph-2d > .overlay {
  57. position: absolute;
  58. top: var(--padding);
  59. left: var(--padding);
  60. bottom: var(--padding);
  61. right: var(--padding);
  62. overflow: visible;
  63. }
  64. voice-graph-2d > .overlay > .marker {
  65. display: online-block;
  66. height: 1.5em;
  67. width: 1.5em;
  68. border-radius: 50%;
  69. background: black;
  70. border: .1em solid white;
  71. position: absolute;
  72. z-index: calc(var(--voice-graph-z-index) + 2);
  73. color: white;
  74. text-align: center;
  75. line-height: 1em;
  76. /*transition: all .1s;*/
  77. top: calc(-.75em);
  78. left: calc(-.75em);
  79. }
  80. .marker:hover {
  81. opacity: 1;
  82. }
  83. .custom-widgets button.marker:after {
  84. box-shadow: 0px;
  85. display: none;
  86. }
  87. /*voice-graph-2d > .overlay > .marker:hover {*/
  88. voice-graph-2d > .overlay > .marker.preview {
  89. }
  90. voice-graph-2d > .overlay > .marker.playing{
  91. border: 2px solid yellow;
  92. }
  93. voice-graph-2d > .overlay > .x.hairline {
  94. content: '';
  95. border-left: .1em dotted black;
  96. display: block;
  97. position: absolute;
  98. z-index: calc(var(--voice-graph-z-index) + 1);
  99. height: 100%;
  100. top: 0px;
  101. left: -1px;
  102. transition: .1s all;
  103. }
  104. voice-graph-2d > .overlay > .hairline.hidden {
  105. opacity: 0;
  106. }
  107. voice-graph-2d > .x-opposite.axis-labels > .current-value {
  108. position: absolute;
  109. width: calc(2 * var(--padding)) ;
  110. text-align: center;
  111. bottom: 0px;
  112. opacity: 0;
  113. left: calc(-1 * var(--padding));
  114. transition: .1s all;
  115. }
  116. voice-graph-2d > .overlay > .y.hairline {
  117. content: '';
  118. border-top: .1em dotted black;
  119. display: block;
  120. position: absolute;
  121. z-index: calc(var(--voice-graph-z-index) + 2);
  122. width: 100%;
  123. left: 0px;
  124. top: -1px;
  125. transition: .1s all;
  126. }
  127. voice-graph-2d > .y-opposite.axis-labels > .current-value {
  128. position: absolute;
  129. height: calc(2 * var(--padding));
  130. text-align: center;
  131. transform: rotate(180deg);
  132. transform-origin: center;
  133. left: 0px;
  134. bottom: calc(-1 * var(--padding));
  135. opacity: 0;
  136. transition: .1s all;
  137. }
  138. voice-graph-2d .marker > .infobox {
  139. position: absolute;
  140. width: 18ch;
  141. left: calc(0.5em - 9ch);
  142. top: calc(-1 * var(--padding));
  143. pointer-events: none;
  144. text-shadow: rgba(0,0,0,.5) 1px 1px, rgba(0,0,0,.5) -1px -1px, rgba(0,0,0,.5) 1px -1px, rgba(0,0,0,.5) -1px 1px;
  145. }
  146. .ratings-bar {
  147. box-sizing: border-box;
  148. display: flex;
  149. width: 100%;
  150. overflow: hidden;
  151. border-radius: 5px 5px 5px 5px;
  152. }
  153. .ratings-bar > span {
  154. padding: 2px 0px 2px 0px;
  155. display: inline-block;
  156. box-sizing: border-box;
  157. overflow: hidden;
  158. font-size: small;
  159. line-height: 1em;
  160. }
  161. .infobox .strongly-agree {
  162. background: #43db20;
  163. color: white;
  164. border-radius: 0px 5px 5px 0px;
  165. }
  166. .infobox .agree {
  167. background: #a5db99;
  168. color: white;
  169. }
  170. .infobox .disagree {
  171. background: #e28888;
  172. color: white;
  173. }
  174. .infobox .strongly-disagree{
  175. background: #e22222;
  176. color: white;
  177. border-radius: 5px 0px 0px 5px;
  178. }
  179. .clef {
  180. position: absolute;
  181. left: 0px;
  182. width: var(--padding);
  183. /*z-index: calc(var(--voice-graph-z-index) + 2);*/
  184. text-align: center;
  185. transform-origin: center center;
  186. transform: scale(2);
  187. padding: 0px;
  188. margin-bottom: -.5em;
  189. }
  190. .clef.treble { top: var(--padding); }
  191. .clef.bass { bottom: var(--padding); }
  192. .instrument {
  193. position: absolute;
  194. bottom: calc(var(--padding) * .1);
  195. height: calc(var(--padding) * .8);
  196. }
  197. .instrument svg {
  198. height: 100%;
  199. }
  200. .instrument.flute {
  201. right: var(--padding);
  202. }
  203. .instrument.tuba {
  204. left: var(--padding);
  205. }