_styleguide.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. .style-guide-color-card {
  2. list-style: none;
  3. margin: 0;
  4. padding: $spacer;
  5. width: 100%;
  6. text-align: left;
  7. text-shadow: 0 0 8px #fff;
  8. color: $black;
  9. font-size: $font-size-sm;
  10. }
  11. .color-card-body-bg { background-color: $body-bg; }
  12. .color-card-page-bg { background-color: $page-bg; }
  13. .color-card-gray { background-color: $gray-1; }
  14. .style-guide-button-list {
  15. padding: $spacer;
  16. button {
  17. display: block;
  18. margin: 0 $spacer $spacer 0;
  19. }
  20. }
  21. // define("areas/styleguide/static/script/app/colors", [], function() {
  22. // "use strict";
  23. // var a = function(a) {
  24. // return 0 === a.indexOf("rgba") ? (a = a.match(/(\d{1,3})/gi),
  25. // [a[0], a[1], a[2]]) : (a = a.replace(/^#/, "").match(/[0-9a-z]{2}/gi),
  26. // [parseInt(a[0], 16), parseInt(a[1], 16), parseInt(a[2], 16)])
  27. // }
  28. // , b = function(b, c) {
  29. // var d = 0
  30. // , e = 0;
  31. // for (b = a(b),
  32. // c = a(c); e < b.length; )
  33. // d += (b[e] - c[e]) * (b[e] - c[e]),
  34. // e++;
  35. // return Math.sqrt(d)
  36. // }
  37. // , c = function() {
  38. // $(".color-card").removeClass("isnt-approximate is-approximate is-exact")
  39. // }
  40. // , d = function() {
  41. // var a = $("#proximityMatch").val()
  42. // , c = $(".swatch");
  43. // c.each(function() {
  44. // var c = $(this)
  45. // , d = b(a, c.children("i").text());
  46. // c.parent().removeClass("is-approximate isnt-approximate is-exact"),
  47. // 20 > d ? (c.css("border-color", /^#/.test(a) ? a : "#" + a),
  48. // c.parent().addClass("is-approximate"),
  49. // c.parent().addClass("has-match"),
  50. // 0 === d && c.parent().addClass("is-exact")) : c.parent().addClass("isnt-approximate")
  51. // })
  52. // }
  53. // , e = $("#proximityMatch")
  54. // , f = function() {
  55. // var a = e.val();
  56. // "#" == a[0] && (a = a.substring(1)),
  57. // 6 == a.length ? d() : c()
  58. // }
  59. // ;
  60. // e.on("input", f),
  61. // e.val() && f();
  62. // var g = function() {
  63. // var a = "/static/images/styleguide/leaves.jpg"
  64. // , b = $("[data-colors]");
  65. // "none" === b.css("background-image") ? b.css("background-image", "url('" + a + "')") : b.css("background-image", "none")
  66. // }
  67. // ;
  68. // $("#toggle-background-image").on("click", g)
  69. // })