moka.less 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. @import "reset.css";
  2. // Mixins
  3. .gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
  4. background: @color;
  5. background: -webkit-gradient(linear,
  6. left bottom,
  7. left top,
  8. color-stop(0, @start),
  9. color-stop(1, @stop));
  10. background: -ms-linear-gradient(bottom,
  11. @start,
  12. @stop);
  13. background: -moz-linear-gradient(center bottom,
  14. @start 0%,
  15. @stop 100%);
  16. background: -o-linear-gradient(@stop,
  17. @start);
  18. filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@stop,@start));
  19. }
  20. .bordered(@top-color: #EEE, @right-color: #EEE, @bottom-color: #EEE, @left-color: #EEE) {
  21. border-top: solid 1px @top-color;
  22. border-left: solid 1px @left-color;
  23. border-right: solid 1px @right-color;
  24. border-bottom: solid 1px @bottom-color;
  25. }
  26. .drop-shadow(@x-axis: 0, @y-axis: 1px, @blur: 2px, @alpha: 0.1) {
  27. -webkit-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
  28. -moz-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
  29. box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
  30. }
  31. .rounded(@radius: 3px) {
  32. -webkit-border-radius: @radius;
  33. -moz-border-radius: @radius;
  34. border-radius: @radius;
  35. }
  36. .inner-shadow(@horizontal:0, @vertical:1px, @blur:2px, @alpha: 0.4) {
  37. -webkit-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
  38. -moz-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
  39. box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
  40. }
  41. .box-shadow(@arguments) {
  42. -webkit-box-shadow: @arguments;
  43. -moz-box-shadow: @arguments;
  44. box-shadow: @arguments;
  45. }
  46. // Moka definitions
  47. // TEMP
  48. body {
  49. background: #d5d5d5;
  50. }
  51. .moka_view {
  52. .mk_default {
  53. // Generic fonts
  54. font-size: 12px;
  55. color: #555;
  56. text-shadow: 0 1px 0 white;
  57. }
  58. // Controls
  59. .mk_control {
  60. &:focus {
  61. outline: 0;
  62. }
  63. }
  64. button, button:active, button:focus {
  65. .mk_default;
  66. .mk_control;
  67. margin: 100px;
  68. .rounded();
  69. .bordered(#999, #999, #999, #999);
  70. .gradient(#fafafa, #dedede, white);
  71. .box-shadow(0 1px 3px 0 #ccc);
  72. padding: 3px 10px;
  73. &:active {
  74. .box-shadow(0 0 3px 0 #ccc);
  75. .gradient(#dedede, #fafafa, #dedede);
  76. }
  77. }
  78. }