cubic-bezier.css 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. /* Based on Lea Verou www.cubic-bezier.com
  5. See https://github.com/LeaVerou/cubic-bezier */
  6. .cubic-bezier-container {
  7. display: flex;
  8. width: 510px;
  9. height: 370px;
  10. flex-direction: row-reverse;
  11. overflow: hidden;
  12. padding: 5px;
  13. box-sizing: border-box;
  14. }
  15. .display-wrap {
  16. width: 50%;
  17. height: 100%;
  18. text-align: center;
  19. overflow: hidden;
  20. }
  21. /* Coordinate Plane */
  22. .coordinate-plane {
  23. width: 150px;
  24. height: 370px;
  25. margin: 0 auto;
  26. position: relative;
  27. }
  28. .control-point {
  29. position: absolute;
  30. z-index: 1;
  31. height: 10px;
  32. width: 10px;
  33. border: 0;
  34. background: #666;
  35. display: block;
  36. margin: -5px 0 0 -5px;
  37. outline: none;
  38. border-radius: 5px;
  39. padding: 0;
  40. cursor: pointer;
  41. }
  42. .display-wrap {
  43. background:
  44. repeating-linear-gradient(0deg,
  45. transparent,
  46. var(--bezier-grid-color) 0,
  47. var(--bezier-grid-color) 1px,
  48. transparent 1px,
  49. transparent 15px) no-repeat,
  50. repeating-linear-gradient(90deg,
  51. transparent,
  52. var(--bezier-grid-color) 0,
  53. var(--bezier-grid-color) 1px,
  54. transparent 1px,
  55. transparent 15px) no-repeat;
  56. background-size: 100% 100%, 100% 100%;
  57. background-position: -2px 5px, -2px 5px;
  58. -moz-user-select: none;
  59. }
  60. canvas.curve {
  61. background:
  62. linear-gradient(-45deg,
  63. transparent 49.7%,
  64. var(--bezier-diagonal-color) 49.7%,
  65. var(--bezier-diagonal-color) 50.3%,
  66. transparent 50.3%) center no-repeat;
  67. background-size: 100% 100%;
  68. background-position: 0 0;
  69. }
  70. /* Timing Function Preview Widget */
  71. .timing-function-preview {
  72. position: absolute;
  73. bottom: 20px;
  74. right: 45px;
  75. width: 150px;
  76. }
  77. .timing-function-preview .scale {
  78. position: absolute;
  79. top: 6px;
  80. left: 0;
  81. z-index: 1;
  82. width: 150px;
  83. height: 1px;
  84. background: #ccc;
  85. }
  86. .timing-function-preview .dot {
  87. position: absolute;
  88. top: 0;
  89. left: -7px;
  90. z-index: 2;
  91. width: 10px;
  92. height: 10px;
  93. border-radius: 50%;
  94. border: 2px solid white;
  95. background: #4C9ED9;
  96. }
  97. /* Preset Widget */
  98. .preset-pane {
  99. width: 50%;
  100. height: 100%;
  101. border-right: 1px solid var(--theme-splitter-color);
  102. padding-right: 4px; /* Visual balance for the panel-arrowcontent border on the left */
  103. }
  104. #preset-categories {
  105. display: flex;
  106. width: 95%;
  107. border: 1px solid var(--theme-splitter-color);
  108. border-radius: 2px;
  109. background-color: var(--theme-toolbar-background);
  110. margin: 3px auto 0 auto;
  111. }
  112. #preset-categories .category:last-child {
  113. border-right: none;
  114. }
  115. .category {
  116. padding: 5px 0px;
  117. width: 33.33%;
  118. text-align: center;
  119. text-transform: capitalize;
  120. border-right: 1px solid var(--theme-splitter-color);
  121. cursor: default;
  122. color: var(--theme-body-color);
  123. text-overflow: ellipsis;
  124. overflow: hidden;
  125. }
  126. .category:hover {
  127. background-color: var(--theme-tab-toolbar-background);
  128. }
  129. .active-category {
  130. background-color: var(--theme-selection-background);
  131. color: var(--theme-selection-color);
  132. }
  133. .active-category:hover {
  134. background-color: var(--theme-selection-background);
  135. }
  136. #preset-container {
  137. padding: 0px;
  138. width: 100%;
  139. height: 331px;
  140. overflow-y: auto;
  141. }
  142. .preset-list {
  143. display: none;
  144. padding-top: 6px;
  145. }
  146. .active-preset-list {
  147. display: flex;
  148. flex-wrap: wrap;
  149. justify-content: flex-start;
  150. }
  151. .preset {
  152. cursor: pointer;
  153. width: 33.33%;
  154. margin: 5px 0px;
  155. text-align: center;
  156. }
  157. .preset canvas {
  158. display: block;
  159. border: 1px solid var(--theme-splitter-color);
  160. border-radius: 3px;
  161. background-color: var(--theme-body-background);
  162. margin: 0 auto;
  163. }
  164. .preset p {
  165. font-size: 80%;
  166. margin: 2px auto 0px auto;
  167. color: var(--theme-body-color-alt);
  168. text-transform: capitalize;
  169. text-overflow: ellipsis;
  170. overflow: hidden;
  171. }
  172. .active-preset p, .active-preset:hover p {
  173. color: var(--theme-body-color);
  174. }
  175. .preset:hover canvas {
  176. border-color: var(--theme-selection-background);
  177. }
  178. .active-preset canvas,
  179. .active-preset:hover canvas {
  180. background-color: var(--theme-selection-background-semitransparent);
  181. border-color: var(--theme-selection-background);
  182. }