spectrum.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. /***
  2. Spectrum Colorpicker v1.3.0
  3. https://github.com/bgrins/spectrum
  4. Author: Brian Grinstead
  5. License: MIT
  6. ***/
  7. .sp-container {
  8. position:absolute;
  9. top:0;
  10. left:0;
  11. display:inline-block;
  12. *display: inline;
  13. *zoom: 1;
  14. /* https://github.com/bgrins/spectrum/issues/40 */
  15. z-index: 9999994;
  16. overflow: hidden;
  17. }
  18. .sp-container.sp-flat {
  19. position: relative;
  20. }
  21. /* Fix for * { box-sizing: border-box; } */
  22. .sp-container,
  23. .sp-container * {
  24. -webkit-box-sizing: content-box;
  25. -moz-box-sizing: content-box;
  26. box-sizing: content-box;
  27. }
  28. /* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */
  29. .sp-top {
  30. position:relative;
  31. width: 100%;
  32. display:inline-block;
  33. }
  34. .sp-top-inner {
  35. position:absolute;
  36. top:0;
  37. left:0;
  38. bottom:0;
  39. right:0;
  40. }
  41. .sp-color {
  42. position: absolute;
  43. top:0;
  44. left:0;
  45. bottom:0;
  46. right:20%;
  47. }
  48. .sp-hue {
  49. position: absolute;
  50. top:0;
  51. right:0;
  52. bottom:0;
  53. left:84%;
  54. height: 100%;
  55. }
  56. .sp-clear-enabled .sp-hue {
  57. top:33px;
  58. height: 77.5%;
  59. }
  60. .sp-fill {
  61. padding-top: 80%;
  62. }
  63. .sp-sat, .sp-val {
  64. position: absolute;
  65. top:0;
  66. left:0;
  67. right:0;
  68. bottom:0;
  69. }
  70. .sp-alpha-enabled .sp-top {
  71. margin-bottom: 18px;
  72. }
  73. .sp-alpha-enabled .sp-alpha {
  74. display: block;
  75. }
  76. .sp-alpha-handle {
  77. position:absolute;
  78. top:-4px;
  79. bottom: -4px;
  80. width: 6px;
  81. left: 50%;
  82. cursor: pointer;
  83. border: 1px solid black;
  84. background: white;
  85. opacity: .8;
  86. }
  87. .sp-alpha {
  88. display: none;
  89. position: absolute;
  90. bottom: -14px;
  91. right: 0;
  92. left: 0;
  93. height: 8px;
  94. }
  95. .sp-alpha-inner {
  96. border: solid 1px #333;
  97. }
  98. .sp-clear {
  99. display: none;
  100. }
  101. .sp-clear.sp-clear-display {
  102. background-position: center;
  103. }
  104. .sp-clear-enabled .sp-clear {
  105. display: block;
  106. position:absolute;
  107. top:0px;
  108. right:0;
  109. bottom:0;
  110. left:84%;
  111. height: 28px;
  112. }
  113. /* Don't allow text selection */
  114. .sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-clear, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button {
  115. -webkit-user-select:none;
  116. -moz-user-select: -moz-none;
  117. -o-user-select:none;
  118. user-select: none;
  119. }
  120. .sp-container.sp-input-disabled .sp-input-container {
  121. display: none;
  122. }
  123. .sp-container.sp-buttons-disabled .sp-button-container {
  124. display: none;
  125. }
  126. .sp-palette-only .sp-picker-container {
  127. display: none;
  128. }
  129. .sp-palette-disabled .sp-palette-container {
  130. display: none;
  131. }
  132. .sp-initial-disabled .sp-initial {
  133. display: none;
  134. }
  135. /* Gradients for hue, saturation and value instead of images. Not pretty... but it works */
  136. .sp-sat {
  137. background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));
  138. -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";
  139. filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81');
  140. }
  141. .sp-val {
  142. background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0));
  143. -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";
  144. filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000');
  145. }
  146. .sp-hue {
  147. background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  148. background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  149. background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  150. background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000));
  151. background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  152. }
  153. /* IE filters do not support multiple color stops.
  154. Generate 6 divs, line them up, and do two color gradients for each.
  155. Yes, really.
  156. */
  157. .sp-1 {
  158. height:17%;
  159. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00');
  160. }
  161. .sp-2 {
  162. height:16%;
  163. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00');
  164. }
  165. .sp-3 {
  166. height:17%;
  167. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff');
  168. }
  169. .sp-4 {
  170. height:17%;
  171. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff');
  172. }
  173. .sp-5 {
  174. height:16%;
  175. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff');
  176. }
  177. .sp-6 {
  178. height:17%;
  179. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000');
  180. }
  181. .sp-hidden {
  182. display: none !important;
  183. }
  184. /* Clearfix hack */
  185. .sp-cf:before, .sp-cf:after { content: ""; display: table; }
  186. .sp-cf:after { clear: both; }
  187. .sp-cf { *zoom: 1; }
  188. /* Mobile devices, make hue slider bigger so it is easier to slide */
  189. @media (max-device-width: 480px) {
  190. .sp-color { right: 40%; }
  191. .sp-hue { left: 63%; }
  192. .sp-fill { padding-top: 60%; }
  193. }
  194. .sp-dragger {
  195. border-radius: 5px;
  196. height: 5px;
  197. width: 5px;
  198. border: 1px solid #fff;
  199. background: #000;
  200. cursor: pointer;
  201. position:absolute;
  202. top:0;
  203. left: 0;
  204. }
  205. .sp-slider {
  206. position: absolute;
  207. top:0;
  208. cursor:pointer;
  209. height: 3px;
  210. left: -1px;
  211. right: -1px;
  212. border: 1px solid #000;
  213. background: white;
  214. opacity: .8;
  215. }
  216. /*
  217. Theme authors:
  218. Here are the basic themeable display options (colors, fonts, global widths).
  219. See http://bgrins.github.io/spectrum/themes/ for instructions.
  220. */
  221. .sp-container {
  222. border-radius: 0;
  223. background-color: #ECECEC;
  224. border: solid 1px #f0c49B;
  225. padding: 0;
  226. }
  227. .sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue, .sp-clear
  228. {
  229. font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
  230. -webkit-box-sizing: border-box;
  231. -moz-box-sizing: border-box;
  232. -ms-box-sizing: border-box;
  233. box-sizing: border-box;
  234. }
  235. .sp-top
  236. {
  237. margin-bottom: 3px;
  238. }
  239. .sp-color, .sp-hue, .sp-clear
  240. {
  241. border: solid 1px #666;
  242. }
  243. /* Input */
  244. .sp-input-container {
  245. float:right;
  246. width: 100px;
  247. margin-bottom: 4px;
  248. }
  249. .sp-initial-disabled .sp-input-container {
  250. width: 100%;
  251. }
  252. .sp-input {
  253. font-size: 12px !important;
  254. border: 1px inset;
  255. padding: 4px 5px;
  256. margin: 0;
  257. width: 100%;
  258. background:transparent;
  259. border-radius: 3px;
  260. color: #222;
  261. }
  262. .sp-input:focus {
  263. border: 1px solid orange;
  264. }
  265. .sp-input.sp-validation-error
  266. {
  267. border: 1px solid red;
  268. background: #fdd;
  269. }
  270. .sp-picker-container , .sp-palette-container
  271. {
  272. float:left;
  273. position: relative;
  274. padding: 10px;
  275. padding-bottom: 300px;
  276. margin-bottom: -290px;
  277. }
  278. .sp-picker-container
  279. {
  280. width: 172px;
  281. border-left: solid 1px #fff;
  282. }
  283. /* Palettes */
  284. .sp-palette-container
  285. {
  286. border-right: solid 1px #ccc;
  287. }
  288. .sp-palette .sp-thumb-el {
  289. display: block;
  290. position:relative;
  291. float:left;
  292. width: 24px;
  293. height: 15px;
  294. margin: 3px;
  295. cursor: pointer;
  296. border:solid 2px transparent;
  297. }
  298. .sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active {
  299. border-color: orange;
  300. }
  301. .sp-thumb-el
  302. {
  303. position:relative;
  304. }
  305. /* Initial */
  306. .sp-initial
  307. {
  308. float: left;
  309. border: solid 1px #333;
  310. }
  311. .sp-initial span {
  312. width: 30px;
  313. height: 25px;
  314. border:none;
  315. display:block;
  316. float:left;
  317. margin:0;
  318. }
  319. .sp-initial .sp-clear-display {
  320. background-position: center;
  321. }
  322. /* Buttons */
  323. .sp-button-container {
  324. float: right;
  325. }
  326. /* Replacer (the little preview div that shows up instead of the <input>) */
  327. .sp-replacer {
  328. margin:0;
  329. overflow:hidden;
  330. cursor:pointer;
  331. padding: 4px;
  332. display:inline-block;
  333. *zoom: 1;
  334. *display: inline;
  335. border: solid 1px #91765d;
  336. background: #eee;
  337. color: #333;
  338. vertical-align: middle;
  339. }
  340. .sp-replacer:hover, .sp-replacer.sp-active {
  341. border-color: #F0C49B;
  342. color: #111;
  343. }
  344. .sp-replacer.sp-disabled {
  345. cursor:default;
  346. border-color: silver;
  347. color: silver;
  348. }
  349. .sp-dd {
  350. padding: 2px 0;
  351. height: 16px;
  352. line-height: 16px;
  353. float:left;
  354. font-size:10px;
  355. }
  356. .sp-preview
  357. {
  358. position:relative;
  359. width:25px;
  360. height: 20px;
  361. border: solid 1px #222;
  362. margin-right: 5px;
  363. float:left;
  364. z-index: 0;
  365. }
  366. .sp-palette
  367. {
  368. *width: 220px;
  369. max-width: 220px;
  370. }
  371. .sp-palette .sp-thumb-el
  372. {
  373. width:16px;
  374. height: 16px;
  375. margin:2px 1px;
  376. border: solid 1px #d0d0d0;
  377. }
  378. .sp-container
  379. {
  380. padding-bottom:0;
  381. }
  382. /* Buttons: http://hellohappy.org/css3-buttons/ */
  383. .sp-container button {
  384. background-color: #eeeeee;
  385. background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
  386. background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
  387. background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
  388. background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
  389. background-image: linear-gradient(to bottom, #eeeeee, #cccccc);
  390. border: 1px solid #ccc;
  391. border-bottom: 1px solid #bbb;
  392. border-radius: 3px;
  393. color: #333;
  394. font-size: 14px;
  395. line-height: 1;
  396. padding: 5px 4px;
  397. text-align: center;
  398. text-shadow: 0 1px 0 #eee;
  399. vertical-align: middle;
  400. }
  401. .sp-container button:hover {
  402. background-color: #dddddd;
  403. background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb);
  404. background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb);
  405. background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);
  406. background-image: -o-linear-gradient(top, #dddddd, #bbbbbb);
  407. background-image: linear-gradient(to bottom, #dddddd, #bbbbbb);
  408. border: 1px solid #bbb;
  409. border-bottom: 1px solid #999;
  410. cursor: pointer;
  411. text-shadow: 0 1px 0 #ddd;
  412. }
  413. .sp-container button:active {
  414. border: 1px solid #aaa;
  415. border-bottom: 1px solid #888;
  416. -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
  417. -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
  418. -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
  419. -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
  420. box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
  421. }
  422. .sp-cancel
  423. {
  424. font-size: 11px;
  425. color: #d93f3f !important;
  426. margin:0;
  427. padding:2px;
  428. margin-right: 5px;
  429. vertical-align: middle;
  430. text-decoration:none;
  431. }
  432. .sp-cancel:hover
  433. {
  434. color: #d93f3f !important;
  435. text-decoration: underline;
  436. }
  437. .sp-palette span:hover, .sp-palette span.sp-thumb-active
  438. {
  439. border-color: #000;
  440. }
  441. .sp-preview, .sp-alpha, .sp-thumb-el
  442. {
  443. position:relative;
  444. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
  445. }
  446. .sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner
  447. {
  448. display:block;
  449. position:absolute;
  450. top:0;left:0;bottom:0;right:0;
  451. }
  452. .sp-palette .sp-thumb-inner
  453. {
  454. background-position: 50% 50%;
  455. background-repeat: no-repeat;
  456. }
  457. .sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner
  458. {
  459. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=);
  460. }
  461. .sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner
  462. {
  463. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=);
  464. }
  465. .sp-clear-display {
  466. background-repeat:no-repeat;
  467. background-position: center;
  468. background-image: url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqa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