color.scss 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. @import "vars";
  2. @import "mixins";
  3. #color-toggles {
  4. background-size: 40px;
  5. border-radius: $radius;
  6. background-color: $dark;
  7. background-image: url('../images/opacity-grid.png');
  8. }
  9. .color-picker {
  10. margin: 6px;
  11. margin-bottom: 0;
  12. width: 256px;
  13. @include backface-visibility(hidden);
  14. &.out .fader-selector {
  15. opacity: 0;
  16. }
  17. .color {
  18. position: relative;
  19. width: 100%;
  20. background-color: #2ecc71;
  21. display: block;
  22. border-top-left-radius: $radius;
  23. border-top-right-radius: $radius;
  24. &:before{
  25. content: "";
  26. display: block;
  27. padding-top: 100%; /* initial ratio of 1:1*/
  28. }
  29. > div {
  30. top: 0;
  31. display: block;
  32. width: 100%;
  33. height: 100%;
  34. position: absolute;
  35. border-top-left-radius: $radius;
  36. border-top-right-radius: $radius;
  37. &.mask {
  38. background-image: url('../images/huevalue.png');
  39. }
  40. }
  41. }
  42. .color-hue {
  43. position: relative;
  44. width: 100%;
  45. &:before{
  46. content: "";
  47. display: block;
  48. padding-top: 40px; /* initial ratio of 1:1*/
  49. }
  50. background-size: 100% 100%;
  51. background-image: url('../images/hue.png');
  52. }
  53. .color-opacity {
  54. &:before{
  55. content: "";
  56. display: block;
  57. padding-top: 40px; /* initial ratio of 1:1*/
  58. }
  59. position: relative;
  60. width: 100%;
  61. background-size: cover;
  62. background-image: url('../images/opacity-strip.png');
  63. }
  64. }
  65. .color-indicator {
  66. box-shadow: inset 0 0 3px rgba(0,0,0,0.1);
  67. border: 2px solid rgba(0,0,0,0.2);
  68. background-clip: padding-box;
  69. }
  70. .fader-selector {
  71. padding: 0px;
  72. background-color: transparent;
  73. border: none;
  74. border: 18px solid $dark;
  75. border: 8px solid $dark;
  76. height: 44px;
  77. width: 44px;
  78. margin: -2px;
  79. position: absolute;
  80. top: 0px;
  81. left: 0px;
  82. border-radius: 100%;
  83. box-shadow: 0 0 10px 1px rgba(255,255,255,0.2), inset 0 0 10px 1px rgba(255,255,255,0.2);
  84. @include transition( border 0.125s ease-in-out);
  85. @include user-select(none);
  86. @include scale(1,1);
  87. &:after {
  88. content: "";
  89. position: absolute;
  90. top: 50%;
  91. left: 50%;
  92. margin-top: -1px;
  93. margin-left: -1px;
  94. height: 2px;
  95. width: 2px;
  96. background-color: white;
  97. pointer-events: none !important;
  98. border-radius: 100%;
  99. }
  100. &:hover,
  101. &:focus,
  102. &:active {
  103. outline: none;
  104. border: 8px solid $light;
  105. }
  106. &:active {
  107. background-color: white;
  108. }
  109. }
  110. .color-palette {
  111. width: 600px;
  112. text-align: center;
  113. .overflow-y-scroll {
  114. padding-top: 10px;
  115. padding-bottom: 15px;
  116. overflow-y: auto;
  117. .btn {
  118. display: inline-block;
  119. height: 40px;
  120. width: 40px;
  121. min-width: 0;
  122. min-height: 0;
  123. margin-left: 4px;
  124. margin-right: 4px;
  125. margin-top: 8px;
  126. padding: 0px;
  127. // background-color: rgba(255,255,255,0.05);
  128. background-clip: padding-box;
  129. border: 2px solid rgba(0,0,0,0.1);
  130. border-radius: 100%;
  131. background-color: transparent;
  132. background-color: rgba(255,255,255,0.025);
  133. /* aspect ratio without spacer image */
  134. &.active,
  135. &:active {
  136. background-clip: border-box;
  137. border: 2px solid white;
  138. }
  139. .icon {
  140. position: absolute;
  141. left: -3.5px;
  142. top: -2px;
  143. @include icon-md;
  144. }
  145. }
  146. }
  147. }
  148. .color .fader-selector { z-index: 10; left: 120px; top: 120px; margin: -22px; cursor: move; }
  149. .color-hue .fader-selector { z-index: 10; left: 0px; margin: -2px -22px; cursor: ew-resize;}
  150. .color-opacity .fader-selector { z-index: 10; left: 120px; margin: -2px -22px; cursor: ew-resize;}
  151. #colors {
  152. #color-target {
  153. text-align: center;
  154. display: block;
  155. }
  156. @include clearfix;
  157. #color-hex {
  158. @include clearfix;
  159. position: relative;
  160. #color-hash {
  161. position: relative;
  162. margin-left: 40px;
  163. width: 196px;
  164. }
  165. .btn {
  166. position: absolute;
  167. z-index: 100;
  168. }
  169. #add-remove-color {
  170. left: 0px;
  171. }
  172. #color-options-toggle {
  173. right: 0px;
  174. }
  175. div {
  176. position: relative;
  177. width: 100%;
  178. .input {
  179. height: 50px;
  180. line-height: 70px;
  181. }
  182. label {
  183. display: block;
  184. position: absolute;
  185. top: 0;
  186. left: 0;
  187. width: 100%;
  188. height: 30px;
  189. line-height: 32px;
  190. font-size: 16px;
  191. opacity: 0.35;
  192. color: #888;
  193. z-index: 10;
  194. text-align: center;
  195. }
  196. }
  197. }
  198. #color-rgba {
  199. position: relative;
  200. @include clearfix;
  201. label {
  202. display: block;
  203. width: 100%;
  204. height: 20px;
  205. line-height: 22px;
  206. font-size: 16px;
  207. opacity: 0.35;
  208. color: #888;
  209. z-index: 10;
  210. text-align: center;
  211. margin-bottom: -14px;
  212. margin-top: 10px;
  213. }
  214. .input {
  215. line-height: 48px;
  216. width: 38px;
  217. }
  218. }
  219. }
  220. .font-size-swatches {
  221. line-height: 50px;
  222. }