Indicator.scss 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /**
  2. * @class Ext.Indicator
  3. */
  4. /**
  5. * @var {color}
  6. * The color of the indicator dots.
  7. */
  8. $indicator-background-color: dynamic(#ccc);
  9. /**
  10. * @var {string/list}
  11. * The background-gradient of the indicator dots.
  12. */
  13. $indicator-background-gradient: dynamic(null);
  14. //# fashion replaces $carousel-indicator-size
  15. /**
  16. * @var {measurement}
  17. * The size (height and width) of indicator dots.
  18. */
  19. $indicator-size: dynamic(6px);
  20. /**
  21. * @var {color}
  22. * The background-color of the active indicator dot.
  23. */
  24. $indicator-active-background-color: dynamic($indicator-background-color);
  25. /**
  26. * @var {string/list}
  27. * The background-gradient of the active indicator dot.
  28. */
  29. $indicator-active-background-gradient: dynamic($indicator-background-gradient);
  30. //# fashion replaces $carousel-indicator-active-size
  31. /**
  32. * @var {measurement}
  33. * The size (height and width) of the active indicator dot.
  34. */
  35. $indicator-active-size: dynamic($indicator-size * 2);
  36. //# fashion replaces $carousel-track-size
  37. /**
  38. * @var {measurement}
  39. * The size of the track the indicator dots are in. The size will be used for the width
  40. * of a vertical indicator or the height of a horizontal indicator.
  41. */
  42. $indicator-track-size: dynamic(26px);
  43. //# fashion replaces $carousel-indicator-spacing
  44. /**
  45. * @var {measurement}
  46. * Amount of space between the indicator dots.
  47. */
  48. $indicator-spacing: dynamic(3px);
  49. //# fashion replaces $carousel-indicator-border-radius
  50. /**
  51. * @var {number}
  52. * The border-radius of the indicator dots.
  53. */
  54. $indicator-border-radius: dynamic(50%);
  55. //# fashion replaces $carousel-light-ui
  56. /**
  57. * @var {map}
  58. * Parameters for the "light" carousel UI.
  59. * Set to `null` to eliminate the UI from the CSS output.
  60. */
  61. $indicator-light-ui: dynamic((
  62. color: rgba(#fff, .1),
  63. active-color: rgba(#fff, .3)
  64. ));
  65. //# fashion replaces $carousel-dark-ui
  66. /**
  67. * @var {map}
  68. * Parameters for the "dark" carousel UI.
  69. * Set to `null` to eliminate the UI from the CSS output.
  70. */
  71. $indicator-dark-ui: dynamic((
  72. color: rgba(#000, .1),
  73. active-color: rgba(#000, .3)
  74. ));
  75. /**
  76. * Creates a theme UI for the indicator component.
  77. *
  78. * @param {string} $ui The name of the UI being created.
  79. * Can not included spaces or special punctuation (used in class names)
  80. * @param {number} $xtype The xtype of the UI being created.
  81. * @param {number} $margin The margin between the indicator dots.
  82. * @param {number} $border-radius The border radius of the indicator dots.
  83. * @param {number} $track-size The size of the track the indicator dots are in.
  84. * @param {color} $background-color The background color of the indicator dots.
  85. * @param {string} $background-gradient The background gradient of the indicator dots.
  86. * @param {number} $size The size of the indicator dots.
  87. * @param {color} $active-background-color The background color of the active indicator dot.
  88. * @param {string} $active-background-gradient The background gradient of the active indicator dot.
  89. * @param {number} $active-size The size of the active indicator dot.
  90. */
  91. @mixin indicator-ui(
  92. $ui: null,
  93. $xtype: indicator,
  94. $margin: $indicator-spacing,
  95. $border-radius: $indicator-border-radius,
  96. $track-size: $indicator-track-size,
  97. $background-color: $indicator-background-color,
  98. $background-gradient: $indicator-background-gradient,
  99. $size: $indicator-size,
  100. $active-background-color: $indicator-active-background-color,
  101. $active-background-gradient: $indicator-active-background-gradient,
  102. $active-size: $indicator-active-size
  103. ) {
  104. $ui-suffix: ui-suffix($ui);
  105. .#{$prefix}#{$xtype}#{$ui-suffix} {
  106. span {
  107. width: $size;
  108. height: $size;
  109. margin: $margin;
  110. @if $enable-border-radius {
  111. @include border-radius($border-radius);
  112. }
  113. @include background-gradient($background-color, $background-gradient);
  114. &.#{$prefix}#{$xtype}-active {
  115. width: $active-size;
  116. height: $active-size;
  117. @include background-gradient($active-background-color, $active-background-gradient);
  118. }
  119. }
  120. &.#{$prefix}#{$xtype}-horizontal {
  121. height: $track-size;
  122. }
  123. &.#{$prefix}#{$xtype}-vertical {
  124. width: $track-size;
  125. }
  126. }
  127. }