moka.less 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. @import "reset.css";
  2. @import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&subset=latin,latin-ext);
  3. // Mixins
  4. .gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
  5. background: @color;
  6. background: -webkit-gradient(linear,
  7. left bottom,
  8. left top,
  9. color-stop(0, @start),
  10. color-stop(1, @stop));
  11. background: -ms-linear-gradient(bottom,
  12. @start,
  13. @stop);
  14. background: -moz-linear-gradient(center bottom,
  15. @start 0%,
  16. @stop 100%);
  17. background: -o-linear-gradient(@stop,
  18. @start);
  19. filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@stop,@start));
  20. }
  21. .bordered(@top-color: #EEE, @right-color: #EEE, @bottom-color: #EEE, @left-color: #EEE) {
  22. border-top: solid 1px @top-color;
  23. border-left: solid 1px @left-color;
  24. border-right: solid 1px @right-color;
  25. border-bottom: solid 1px @bottom-color;
  26. }
  27. .drop-shadow(@x-axis: 0, @y-axis: 1px, @blur: 2px, @alpha: 0.1) {
  28. -webkit-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
  29. -moz-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
  30. box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
  31. }
  32. .rounded(@radius: 3px) {
  33. -webkit-border-radius: @radius;
  34. -moz-border-radius: @radius;
  35. border-radius: @radius;
  36. }
  37. .inner-shadow(@horizontal:0, @vertical:1px, @blur:2px, @alpha: 0.4) {
  38. -webkit-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
  39. -moz-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
  40. box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
  41. }
  42. .box-shadow(@arguments) {
  43. -webkit-box-shadow: @arguments;
  44. -moz-box-shadow: @arguments;
  45. box-shadow: @arguments;
  46. }
  47. .no-select {
  48. -webkit-touch-callout: none;
  49. -webkit-user-select: none;
  50. -khtml-user-select: none;
  51. -moz-user-select: none;
  52. -ms-user-select: none;
  53. user-select: none;
  54. }
  55. // Moka definitions
  56. // TEMP
  57. body {
  58. background: #d5d5d5;
  59. }
  60. .moka_view {
  61. display: inline-block;
  62. .mk_default {
  63. // Generic fonts
  64. font-size: 12px;
  65. font-family: "Open Sans";
  66. color: #555;
  67. text-shadow: 0 1px 0 white;
  68. }
  69. // Labels
  70. span {
  71. .mk_default;
  72. color: #333;
  73. padding: 4px;
  74. }
  75. // Controls
  76. .mk_control, .mk_control:active, .mk_control:focus {
  77. .mk_default;
  78. margin: 4px;
  79. padding: 3px 10px;
  80. .rounded();
  81. .bordered(#999, #999, #999, #999);
  82. .box-shadow(0 0 3px 0 #ccc);
  83. background: white;
  84. &:focus {
  85. outline: 0;
  86. .box-shadow(0 0 2px #08c);
  87. }
  88. }
  89. button {
  90. .mk_control;
  91. .gradient(#fafafa, #dedede, white);
  92. &:active {
  93. background: #dedede;
  94. .box-shadow(inset 0 0 3px 0 #aaa);
  95. }
  96. }
  97. input {
  98. .mk_control;
  99. text-shadow: 0 0 0;
  100. &:focus {
  101. .box-shadow(inset 0 0 3px 0 #08c);
  102. }
  103. }
  104. input[type="checkbox"] {
  105. position: absolute;
  106. left: -999999px;
  107. }
  108. input[type="checkbox"] + label {
  109. .no-select;
  110. padding: 0 6px;
  111. background: url('../images/moka/check.png') 50% 50% no-repeat;
  112. height: 16px;
  113. width: 16px;
  114. }
  115. input[type="checkbox"]:focus + label {
  116. background-image: url('../images/moka/check-focus.png');
  117. .box-shadow(0 0 2px #08c);
  118. }
  119. input[type="checkbox"]:checked + label {
  120. background-image: url('../images/moka/check-active.png');
  121. }
  122. }