build.less 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Datepicker .less buildfile. Includes select mixins/variables from bootstrap
  2. // and imports the included datepicker.less to output a minimal datepicker.css
  3. //
  4. // Usage:
  5. // lessc build.less datepicker.css
  6. //
  7. // Variables and mixins copied from bootstrap 2.0.2
  8. // Variables
  9. @grayLight: #999;
  10. @grayLighter: #eee;
  11. @white: #fff;
  12. @linkColor: #08c;
  13. @btnPrimaryBackground: @linkColor;
  14. @orange: #f89406;
  15. @infoBackground: #d9edf7;
  16. @baseLineHeight: 18px;
  17. @baseBorderRadius: 4px;
  18. // Mixins
  19. // Border Radius
  20. .border-radius(@radius: 5px) {
  21. -webkit-border-radius: @radius;
  22. -moz-border-radius: @radius;
  23. border-radius: @radius;
  24. }
  25. // Button backgrounds
  26. .buttonBackground(@startColor, @endColor) {
  27. .gradientBar(@startColor, @endColor);
  28. .reset-filter();
  29. &:hover, &:active, &.active, &.disabled, &[disabled] {
  30. background-color: @endColor;
  31. }
  32. &:active,
  33. &.active {
  34. background-color: darken(@endColor, 10%) e("\9");
  35. }
  36. }
  37. // Reset filters for IE
  38. .reset-filter() {
  39. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  40. }
  41. // Gradient Bar Colors for buttons and alerts
  42. .gradientBar(@primaryColor, @secondaryColor) {
  43. #gradient > .vertical(@primaryColor, @secondaryColor);
  44. border-color: @secondaryColor @secondaryColor darken(@secondaryColor, 15%);
  45. border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
  46. }
  47. // Gradients
  48. #gradient {
  49. .vertical(@startColor: #555, @endColor: #333) {
  50. background-color: mix(@startColor, @endColor, 60%);
  51. background-image: -moz-linear-gradient(to bottom, @startColor, @endColor); // FF 3.6+
  52. background-image: -ms-linear-gradient(to bottom, @startColor, @endColor); // IE10
  53. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
  54. background-image: -webkit-linear-gradient(to bottom, @startColor, @endColor); // Safari 5.1+, Chrome 10+
  55. background-image: -o-linear-gradient(to bottom, @startColor, @endColor); // Opera 11.10
  56. background-image: linear-gradient(to bottom, @startColor, @endColor); // The standard
  57. background-repeat: repeat-x;
  58. filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down
  59. }
  60. }
  61. @import "../less/datepicker.less";