abp.mixings.less 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. // COMMON MIXINGS ///////////////////////////////////////////////////////////////////////
  2. //Clearing
  3. .abp-clear-margin-padding() {
  4. padding: 0;
  5. margin: 0;
  6. }
  7. .abp-clear-list-styles() {
  8. .abp-clear-margin-padding;
  9. list-style: none;
  10. }
  11. //Docking
  12. @abp-default-dock-margin: 0;
  13. .abp-dock(top, @margin: @abp-default-dock-margin) {
  14. left: 0;
  15. top: 0;
  16. right: 0;
  17. }
  18. .abp-dock(right, @margin: @abp-default-dock-margin) {
  19. right: 0;
  20. top: 0;
  21. bottom: 0;
  22. }
  23. .abp-dock(bottom, @margin: @abp-default-dock-margin) {
  24. left: 0;
  25. right: 0;
  26. bottom: 0;
  27. }
  28. .abp-dock(left, @margin: @abp-default-dock-margin) {
  29. left: 0;
  30. top: 0;
  31. bottom: 0;
  32. }
  33. .abp-dock(top-left, @margin: @abp-default-dock-margin) {
  34. left: 0;
  35. top: 0;
  36. }
  37. .abp-dock(top-right, @margin: @abp-default-dock-margin) {
  38. top: 0;
  39. right: 0;
  40. }
  41. .abp-dock(bottom-right, @margin: @abp-default-dock-margin) {
  42. bottom: 0;
  43. right: 0;
  44. }
  45. .abp-dock(bottom-left, @margin: @abp-default-dock-margin) {
  46. bottom: 0;
  47. left: 0;
  48. }
  49. .abp-dock(@direction, @margin: @abp-default-dock-margin) {
  50. position: absolute;
  51. margin: @margin;
  52. }
  53. //Background
  54. .abp-vertical-gradient(@top_color, @bottom_color) {
  55. background: @top_color; // Old browsers
  56. background: -moz-linear-gradient(top, @top_color 0%, @bottom_color 100%); // FF3.6+
  57. background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,@top_color), color-stop(100%,@bottom_color)); // Chrome,Safari4+
  58. background: -webkit-linear-gradient(top, @top_color 0%,@bottom_color 100%); // Chrome10+,Safari5.1+
  59. background: -o-linear-gradient(top, @top_color 0%,@bottom_color 100%); // Opera 11.10+
  60. background: -ms-linear-gradient(top, @top_color 0%,@bottom_color 100%); // IE10+
  61. background: linear-gradient(to bottom, @top_color 0%,@bottom_color 100%); // W3C
  62. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@{top_color}', endColorstr='@{bottom_color}',GradientType=0 ); // IE6-9
  63. }
  64. .abp-horizontal-gradient(@left_color, @right_color) {
  65. background: rgb(238,238,238); // Old browsers
  66. background: -moz-linear-gradient(left, @left_color 0%, @right_color 100%); // FF3.6+
  67. background: -webkit-gradient(linear, left top, right top, color-stop(0%,@left_color), color-stop(100%,@right_color)); // Chrome,Safari4+
  68. background: -webkit-linear-gradient(left, @left_color 0%,@right_color 100%); // Chrome10+,Safari5.1+
  69. background: -o-linear-gradient(left, @left_color 0%,@right_color 100%); // Opera 11.10+
  70. background: -ms-linear-gradient(left, @left_color 0%,@right_color 100%); // IE10+
  71. background: linear-gradient(to right, @left_color 0%,@right_color 100%); // W3C
  72. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@{left_color}', endColorstr='@{right_color}',GradientType=1 ); // IE6-9
  73. }
  74. //Misc
  75. .abp-border-radius(@radius) {
  76. -webkit-border-radius: @radius;
  77. -moz-border-radius: @radius;
  78. border-radius: @radius;
  79. }
  80. .abp-opacity(@value) {
  81. opacity: @value;
  82. //IE8 and earlier
  83. @ieValue: @value * 100;
  84. filter: alpha(opacity=@ieValue);
  85. }