menu.css 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. body {
  2. font-family: "Myriad Pro", Frutiger, "Lucida Grande", "Lucida Sans", "Lucida Sans Unicode", Verdana, sans-serif;
  3. background-color: #EDF5F8;
  4. margin: 0;
  5. padding: 1em;
  6. }
  7. button {
  8. display: inline-block;
  9. vertical-align: 20%;
  10. cursor: pointer;
  11. border: 0;
  12. padding: .25em 1em;
  13. color: #fff;
  14. border-radius: .25em;
  15. *outline: none;
  16. font-size: 12px;
  17. background-color: #173b6d;
  18. background-image: linear-gradient(to bottom, #1a4a8e, #173b6d);
  19. -webkit-box-shadow: 0 .25em 0 rgba(23, 59, 109, 0.3);
  20. box-shadow: 0 .25em 0 rgba(23, 59, 109, 0.3), inset 0 1px 0 rgba(0, 0, 0, 0.3);
  21. transition: all 150ms ease-in;
  22. }
  23. button:focus {
  24. background-color: #2158a9;
  25. background-image: -webkit-linear-gradient(top, #2063c0, #1d4d90);
  26. background-image: linear-gradient(to bottom, #2063c0, #1d4d90);
  27. }
  28. button:active {
  29. box-shadow: 0 0 0 rgba(23, 59, 109, 0.3), inset 0 1px 0 rgba(0, 0, 0, 0.3);
  30. transform: translateY(.25em);
  31. }
  32. .menu-wrapper {
  33. min-width: 9em;
  34. max-width: 25em;
  35. }
  36. .menu {
  37. padding: 20px;
  38. border: 1px solid #ccc;
  39. background-color: #fff;
  40. }
  41. .menu-settings {
  42. padding: 20px;
  43. border: 1px solid #ccc;
  44. background-color: #eee;
  45. margin: 10px 0 0;
  46. }
  47. .menu-title {
  48. margin: 0;
  49. margin-bottom: .5em;
  50. vertical-align: middle;
  51. }
  52. .flip-trigger {
  53. margin-left: 0.5em;
  54. }
  55. .menu-list {
  56. margin: 0;
  57. }
  58. .menu-list li {
  59. border-bottom: 1px solid #ccc;
  60. line-height: 1.5; /* 24 px */
  61. }
  62. .checkboxes {
  63. list-style: none;
  64. padding: 0;
  65. }
  66. .checkboxes li {
  67. margin-bottom: .5em;
  68. }
  69. /* only target IE8+, so to speak. */
  70. :root input[type="checkbox"] {
  71. position: absolute;
  72. overflow: hidden;
  73. width: 1px;
  74. height: 1px;
  75. clip: rect(0 0 0 0);
  76. }
  77. :root input[type="checkbox"] + label {
  78. line-height: 1.5;
  79. color: #333;
  80. padding-left: 1.5em;
  81. background-position: .125em 36%;
  82. background-repeat: no-repeat;
  83. -moz-background-size: 18px 18px;
  84. background-size: 18px 18px;
  85. }
  86. /**
  87. * fallbacks to png for when :checked is supported but no svg support/no js.
  88. * (in effect for Android 2.X)
  89. */
  90. :root input[type="checkbox"] + label {
  91. background-image: url(../images/checkbox-unchecked.png);
  92. }
  93. :root input[type="checkbox"]:checked + label {
  94. background-image: url(../images/checkbox-checked.png);
  95. }
  96. :root input[type="checkbox"]:focus + label {
  97. background-image: url(../images/checkbox-unchecked-focus.png);
  98. }
  99. :root input[type="checkbox"]:focus:checked + label {
  100. background-image: url(../images/checkbox-checked-focus.png);
  101. }
  102. /**
  103. * Modern browsers supporting SVG will get the inline SVG as data URI:s.
  104. * The SVG file is basically raw in the URL, but encoded to escape the SVG
  105. * code.
  106. * This boosts performance by cutting the number of requests and prevents
  107. * an ugly "white flash" as the browser switches from one graphic to the next
  108. * before all images have loaded.
  109. */
  110. /* unchecked checkbox: */
  111. :root.svgbg input[type="checkbox"] + label {
  112. background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%20width%3D%2236%22%20height%3D%2236%22%3E%3Cpath%20fill%3D%22%23fff%22%20stroke%3D%22%23ccc%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20d%3D%22M35%2029c0%203.3-2.7%206-6%206H7c-3.3%200-6-2.7-6-6V7c0-3.3%202.7-6%206-6h22c3.3%200%206%202.7%206%206v22z%22%2F%3E%3C%2Fsvg%3E);
  113. }
  114. /* checked checkbox: */
  115. :root.svgbg input[type="checkbox"]:checked + label {
  116. background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%20width%3D%2236%22%20height%3D%2236%22%3E%3Cpath%20fill%3D%22%23fff%22%20stroke%3D%22%23ccc%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20d%3D%22M35%2029c0%203.3-2.7%206-6%206H7c-3.3%200-6-2.7-6-6V7c0-3.3%202.7-6%206-6h22c3.3%200%206%202.7%206%206v22z%22%2F%3E%3Cpath%20fill%3D%22%231A4A8E%22%20d%3D%22M26%205l5.2%206.7S19.1%2031.2%2019.1%2031.3L5%2021l4-4%209%207%208-19z%22%2F%3E%3C%2Fsvg%3E);
  117. }
  118. /* focused (but unchecked) checkbox: */
  119. :root.svgbg input[type="checkbox"]:focus + label {
  120. color: #000;
  121. background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%20width%3D%2236%22%20height%3D%2236%22%3E%3Cpath%20fill%3D%22%23fff%22%20stroke%3D%22%235DA2F8%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20d%3D%22M35%2029c0%203.3-2.7%206-6%206H7c-3.3%200-6-2.7-6-6V7c0-3.3%202.7-6%206-6h22c3.3%200%206%202.7%206%206v22z%22%2F%3E%3C%2Fsvg%3E);
  122. }
  123. /* checked and focused checkbox: */
  124. :root.svgbg input[type="checkbox"]:focus:checked + label {
  125. background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%20width%3D%2236%22%20height%3D%2236%22%3E%3Cpath%20fill%3D%22%23fff%22%20stroke%3D%22%235DA2F8%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20d%3D%22M35%2029c0%203.3-2.7%206-6%206H7c-3.3%200-6-2.7-6-6V7c0-3.3%202.7-6%206-6h22c3.3%200%206%202.7%206%206v22z%22%2F%3E%3Cpath%20fill%3D%22%231A4A8E%22%20d%3D%22M26%205l5.2%206.7S19.1%2031.2%2019.1%2031.3L5%2021l4-4%209%207%208-19z%22%2F%3E%3C%2Fsvg%3E);
  126. }