Checkbox.scss 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. /**
  2. * @class Ext.field.Checkbox
  3. */
  4. /**
  5. * @var {number}
  6. * Checkbox Field checkbox size
  7. */
  8. $checkboxfield-checkbox-size: dynamic(16px);
  9. /**
  10. * @var {number}
  11. * Checkbox Field checkbox size in the {@link Global_CSS#$enable-big big} sizing scheme
  12. */
  13. $checkboxfield-checkbox-size-big: dynamic(20px);
  14. /**
  15. * @var {number}
  16. * Checkbox Field checkbox font size
  17. */
  18. $checkboxfield-checkbox-font-size: dynamic(null);
  19. /**
  20. * @var {number}
  21. * CheckboxField checkbox font size in the {@link Global_CSS#$enable-big big} sizing scheme
  22. */
  23. $checkboxfield-checkbox-font-size-big: dynamic(null);
  24. /**
  25. * @var {number}
  26. * CheckboxField checkbox margin
  27. */
  28. $checkboxfield-checkbox-margin: dynamic(null);
  29. /**
  30. * @var {number}
  31. * CheckboxField checkbox margin in the {@link Global_CSS#$enable-big big} sizing scheme
  32. */
  33. $checkboxfield-checkbox-margin-big: dynamic(null);
  34. /**
  35. * @var {string/list}
  36. * Checkbox Field checkbox icon
  37. */
  38. $checkboxfield-checkbox-icon: dynamic($fa-var-square-o);
  39. /**
  40. * @var {string/list}
  41. * Checkbox Field checkbox icon when checked
  42. */
  43. $checkboxfield-checked-checkbox-icon: dynamic($fa-var-check-square-o);
  44. /**
  45. * @var {color}
  46. * Checkbox Field checkbox color
  47. */
  48. $checkboxfield-checkbox-color: dynamic($neutral-dark-color);
  49. /**
  50. * @var {color}
  51. * Checkbox Field checkbox color when checked
  52. */
  53. $checkboxfield-checked-checkbox-color: dynamic(null);
  54. /**
  55. * @var {color}
  56. * Checkbox Field checkbox color when disabled
  57. */
  58. $checkboxfield-disabled-checkbox-color: dynamic(null);
  59. /**
  60. * @var {color}
  61. * Checkbox Field checkbox color when focused
  62. */
  63. $checkboxfield-focused-checkbox-color: dynamic(mix(#fff, $base-color, 15%));
  64. /**
  65. * @var {color}
  66. * Checkbox Field {@link #boxLabel} text color
  67. */
  68. $checkboxfield-box-label-color: dynamic($field-box-label-color);
  69. /**
  70. * @var {string/number}
  71. * Checkbox Field {@link #boxLabel} font-weight
  72. */
  73. $checkboxfield-box-label-font-weight: dynamic($field-box-label-font-weight);
  74. /**
  75. * @var {number}
  76. * Checkbox Field {@link #boxLabel} font-size
  77. */
  78. $checkboxfield-box-label-font-size: dynamic($field-box-label-font-size);
  79. /**
  80. * @var {number}
  81. * Checkbox Field {@link #boxLabel} font-size in the {@link Global_CSS#$enable-big big} sizing scheme
  82. */
  83. $checkboxfield-box-label-font-size-big: dynamic($field-box-label-font-size-big);
  84. /**
  85. * @var {number}
  86. * Checkbox Field {@link #boxLabel} line-height
  87. */
  88. $checkboxfield-box-label-line-height: dynamic($field-box-label-line-height);
  89. /**
  90. * @var {number}
  91. * Checkbox Field {@link #boxLabel} line-height in the {@link Global_CSS#$enable-big big} sizing scheme
  92. */
  93. $checkboxfield-box-label-line-height-big: dynamic($field-box-label-line-height-big);
  94. /**
  95. * @var {string}
  96. * Checkbox Field {@link #boxLabel} font-family
  97. */
  98. $checkboxfield-box-label-font-family: dynamic($field-box-label-font-family);
  99. /**
  100. * @var {number/list}
  101. * Checkbox Field {@link #boxLabel} padding
  102. * The padding box will be flipped horizontally when {@link #boxLabelAlign} is `before`
  103. */
  104. $checkboxfield-box-label-padding: dynamic($field-box-label-padding);
  105. /**
  106. * @var {number/list}
  107. * Checkbox Field {@link #boxLabel} padding in the {@link Global_CSS#$enable-big big} sizing scheme
  108. * The padding box will be flipped horizontally when {@link #boxLabelAlign} is `before`
  109. */
  110. $checkboxfield-box-label-padding-big: dynamic($field-box-label-padding-big);
  111. /**
  112. * Creates a visual theme for a Checkbox Field
  113. *
  114. * @param {string} $ui
  115. * The name of the UI being created. Can not included spaces or special punctuation
  116. * (used in CSS class names).
  117. *
  118. * @param {String} [$xtype=checkboxfield] (protected) The {@link Ext.Class#xtype} to use
  119. * in CSS selectors. For use by UI mixins of derived classes.
  120. *
  121. * @param {number} $checkbox-size
  122. * Checkbox Field checkbox size
  123. *
  124. * @param {number} $checkbox-size-big
  125. * Checkbox Field checkbox size in the {@link Global_CSS#$enable-big big} sizing scheme
  126. *
  127. * @param {number} $checkbox-font-size
  128. * Checkbox Field checkbox font size
  129. *
  130. * @param {number} $checkbox-font-size-big
  131. * CheckboxField checkbox font size in the {@link Global_CSS#$enable-big big} sizing scheme
  132. *
  133. * @param {number} $checkbox-margin
  134. * CheckboxField checkbox margin
  135. *
  136. * @param {number} $checkbox-margin-big
  137. * CheckboxField checkbox margin in the {@link Global_CSS#$enable-big big} sizing scheme
  138. *
  139. * @param {string/list} $checkbox-icon
  140. * Checkbox Field checkbox icon
  141. *
  142. * @param {string/list} $checked-checkbox-icon
  143. * Checkbox Field checkbox icon when checked
  144. *
  145. * @param {color} $checkbox-color
  146. * Checkbox Field checkbox color
  147. *
  148. * @param {color} $checked-checkbox-color
  149. * Checkbox Field checkbox color when checked
  150. *
  151. * @param {color} $disabled-checkbox-color
  152. * Checkbox Field checkbox color when disabled
  153. *
  154. * @param {color} $focused-checkbox-color
  155. * Checkbox Field checkbox color when focused
  156. *
  157. * @param {color} $box-label-color
  158. * Checkbox Field {@link #boxLabel} text color
  159. *
  160. * @param {string/number} $box-label-font-weight
  161. * Checkbox Field {@link #boxLabel} font-weight
  162. *
  163. * @param {number} $box-label-font-size
  164. * Checkbox Field {@link #boxLabel} font-size
  165. *
  166. * @param {number} $box-label-font-size-big
  167. * Checkbox Field {@link #boxLabel} font-size in the {@link Global_CSS#$enable-big big} sizing scheme
  168. *
  169. * @param {number} $box-label-line-height
  170. * Checkbox Field {@link #boxLabel} line-height
  171. *
  172. * @param {number} $box-label-line-height-big
  173. * Checkbox Field {@link #boxLabel} line-height in the {@link Global_CSS#$enable-big big} sizing scheme
  174. *
  175. * @param {string} $box-label-font-family
  176. * Checkbox Field {@link #boxLabel} font-family
  177. *
  178. * @param {number/list} $box-label-padding
  179. * Checkbox Field {@link #boxLabel} padding
  180. * The padding box will be flipped horizontally when {@link #boxLabelAlign} is `before`
  181. *
  182. * @param {number/list} $box-label-padding-big
  183. * Checkbox Field {@link #boxLabel} padding in the {@link Global_CSS#$enable-big big} sizing scheme
  184. * The padding box will be flipped horizontally when {@link #boxLabelAlign} is `before`
  185. */
  186. @mixin checkboxfield-ui(
  187. $ui: null,
  188. $xtype: checkboxfield,
  189. $checkbox-size: null,
  190. $checkbox-size-big: null,
  191. $checkbox-font-size: null,
  192. $checkbox-font-size-big: null,
  193. $checkbox-margin: null,
  194. $checkbox-margin-big: null,
  195. $checkbox-icon: null,
  196. $checked-checkbox-icon: null,
  197. $checkbox-color: null,
  198. $checked-checkbox-color: null,
  199. $disabled-checkbox-color: null,
  200. $focused-checkbox-color: null,
  201. $box-label-color: null,
  202. $box-label-font-weight: null,
  203. $box-label-font-size: null,
  204. $box-label-font-size-big: null,
  205. $box-label-line-height: null,
  206. $box-label-line-height-big: null,
  207. $box-label-font-family: null,
  208. $box-label-padding: null,
  209. $box-label-padding-big: null
  210. ) {
  211. $ui-suffix: ui-suffix($ui);
  212. .#{$prefix}#{$xtype}#{$ui-suffix} {
  213. .#{$prefix}icon-el {
  214. margin: $checkbox-margin;
  215. @if $enable-big {
  216. .#{$prefix}big & {
  217. margin: $checkbox-margin-big;
  218. }
  219. }
  220. @include icon(
  221. $icon: $checkbox-icon,
  222. $color: $checkbox-color,
  223. $size: $checkbox-size,
  224. $size-big: $checkbox-size-big,
  225. $font-size: $checkbox-font-size,
  226. $font-size-big: $checkbox-font-size-big
  227. );
  228. }
  229. &.#{$prefix}checked .#{$prefix}icon-el {
  230. @include icon($checked-checkbox-icon);
  231. color: $checked-checkbox-color;
  232. }
  233. &.#{$prefix}focused .#{$prefix}icon-el {
  234. .#{$prefix}keyboard-mode & {
  235. color: $focused-checkbox-color;
  236. }
  237. }
  238. &.#{$prefix}disabled .#{$prefix}icon-el {
  239. color: $disabled-checkbox-color;
  240. }
  241. @include box-label-ui(
  242. $box-label-color: $box-label-color,
  243. $box-label-font-weight: $box-label-font-weight,
  244. $box-label-font-size: $box-label-font-size,
  245. $box-label-font-size-big: $box-label-font-size-big,
  246. $box-label-line-height: $box-label-line-height,
  247. $box-label-line-height-big: $box-label-line-height-big,
  248. $box-label-font-family: $box-label-font-family,
  249. $box-label-padding: $box-label-padding,
  250. $box-label-padding-big: $box-label-padding-big
  251. );
  252. }
  253. }