Base.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. /**
  2. * @class Ext.grid.cell.Base
  3. */
  4. /**
  5. * @var {color}
  6. * Grid Cell text color
  7. */
  8. $gridcell-color: dynamic(null);
  9. /**
  10. * @var {color}
  11. * Grid Cell text color when hovered
  12. */
  13. $gridcell-hovered-color: dynamic($gridrow-hovered-color or $listitem-hovered-color);
  14. /**
  15. * @var {color}
  16. * Grid Cell text color when selected
  17. */
  18. $gridcell-selected-color: dynamic($gridrow-selected-color or $listitem-selected-color);
  19. /**
  20. * @var {color}
  21. * Grid Cell text color when pressed
  22. */
  23. $gridcell-pressed-color: dynamic($gridrow-pressed-color or $listitem-pressed-color);
  24. /**
  25. * @var {color}
  26. * Grid Cell background-color
  27. */
  28. $gridcell-background-color: dynamic(null);
  29. /**
  30. * @var {color}
  31. * Grid Cell background-color when hovered
  32. */
  33. $gridcell-hovered-background-color: dynamic($gridrow-hovered-background-color or $listitem-hovered-background-color);
  34. /**
  35. * @var {color}
  36. * Grid Cell background-color when selected
  37. */
  38. $gridcell-selected-background-color: dynamic($gridrow-selected-background-color or $listitem-selected-background-color);
  39. /**
  40. * @var {color}
  41. * Grid Cell background-color when pressed
  42. */
  43. $gridcell-pressed-background-color: dynamic($gridrow-pressed-background-color or $listitem-pressed-background-color);
  44. /**
  45. * @var {number}
  46. * Grid Cell {@link Ext.grid.Grid#columnLines column} border-width
  47. */
  48. $gridcell-column-border-width: dynamic(1px);
  49. /**
  50. * @var {string}
  51. * Grid Cell {@link Ext.grid.Grid#columnLines column} border-style
  52. */
  53. $gridcell-column-border-style: dynamic($gridrow-border-style or $listitem-border-style);
  54. /**
  55. * @var {color}
  56. * Grid Cell {@link Ext.grid.Grid#columnLines column} border-color
  57. */
  58. $gridcell-column-border-color: dynamic($gridrow-border-color or $listitem-border-color);
  59. /**
  60. * @var {number}
  61. * Grid Cell outline-width when focused
  62. */
  63. $gridcell-focused-outline-width: dynamic($listitem-focused-outline-width);
  64. /**
  65. * @var {string}
  66. * Grid Cell outline-style when focused
  67. */
  68. $gridcell-focused-outline-style: dynamic($listitem-focused-outline-style);
  69. /**
  70. * @var {color}
  71. * Grid Cell outline-color when focused
  72. */
  73. $gridcell-focused-outline-color: dynamic($listitem-focused-outline-color);
  74. /**
  75. * @var {number}
  76. * Grid Cell outline-offset when focused
  77. */
  78. $gridcell-focused-outline-offset: dynamic($listitem-focused-outline-offset);
  79. //# fashion replaces $grid-cell-font-weight
  80. /**
  81. * @var {string/number}
  82. * Grid Cell font-weight
  83. */
  84. $gridcell-font-weight: dynamic($listitem-font-weight);
  85. //# fashion replaces $grid-cell-font-size
  86. /**
  87. * @var {number}
  88. * Grid Cell font-size
  89. */
  90. $gridcell-font-size: dynamic($listitem-font-size);
  91. //# fashion replaces $grid-cell-font-size-big
  92. /**
  93. * @var {number}
  94. * Grid Cell font-size in the {@link Global_CSS#$enable-big big} sizing scheme
  95. */
  96. $gridcell-font-size-big: dynamic($listitem-font-size-big);
  97. //# fashion replaces $grid-cell-line-height
  98. /**
  99. * @var {number}
  100. * Grid Cell line-height
  101. */
  102. $gridcell-line-height: dynamic($listitem-line-height);
  103. //# fashion replaces $grid-cell-line-height-big
  104. /**
  105. * @var {number}
  106. * Grid Cell line-height in the {@link Global_CSS#$enable-big big} sizing scheme
  107. */
  108. $gridcell-line-height-big: dynamic($listitem-line-height-big);
  109. //# fashion replaces $grid-cell-font-family
  110. /**
  111. * @var {string}
  112. * Grid Cell font-family
  113. */
  114. $gridcell-font-family: dynamic($listitem-font-family);
  115. //# fashion replaces $grid-cell-padding
  116. /**
  117. * @var {number/list}
  118. * Grid Cell padding
  119. */
  120. $gridcell-padding: dynamic($listitem-padding);
  121. //# fashion replaces $grid-cell-padding-big
  122. /**
  123. * @var {number/list}
  124. * Grid Cell padding in the {@link Global_CSS#$enable-big big} sizing scheme
  125. */
  126. $gridcell-padding-big: dynamic($listitem-padding-big);
  127. /**
  128. * @var {string/list}
  129. * Grid Cell {@link Ext.grid.Grid#markDirty dirty} icon
  130. */
  131. $gridcell-dirty-icon: dynamic($ext-var-dirty ExtJS);
  132. /**
  133. * @var {color}
  134. * Grid Cell {@link Ext.grid.Grid#markDirty dirty} icon color
  135. */
  136. $gridcell-dirty-icon-color: dynamic($alert-color);
  137. /**
  138. * @var {number}
  139. * Grid Cell {@link Ext.grid.Grid#markDirty dirty} icon size
  140. */
  141. $gridcell-dirty-icon-size: dynamic(14px);
  142. /**
  143. * @var {number}
  144. * Grid Cell {@link Ext.grid.Grid#markDirty dirty} icon size in the
  145. * {@link Global_CSS#$enable-big big} sizing scheme
  146. */
  147. $gridcell-dirty-icon-size-big: dynamic(18px);
  148. /**
  149. * @var {number}
  150. * Grid Cell {@link Ext.grid.Grid#markDirty dirty} icon font-size
  151. */
  152. $gridcell-dirty-icon-font-size: dynamic(null);
  153. /**
  154. * @var {number}
  155. * Grid Cell {@link Ext.grid.Grid#markDirty dirty} icon font-size in the
  156. * {@link Global_CSS#$enable-big big} sizing scheme
  157. */
  158. $gridcell-dirty-icon-font-size-big: dynamic(null);
  159. /**
  160. * @var {Map}
  161. * Parameters for the `summary` gridcell UI used for cells in a summary row
  162. * @ui gridcell-ui
  163. */
  164. $gridcell-summary-ui: dynamic((
  165. font-weight: $font-weight-bold
  166. ));
  167. /**
  168. * Creates a visual theme for a Grid Cell.
  169. *
  170. * @param {string} $ui
  171. * The name of the UI being created. Can not included spaces or special punctuation
  172. * (used in CSS class names).
  173. *
  174. * @param {String} [$xtype=gridcell] (protected) The {@link Ext.Class#xtype} to use
  175. * in CSS selectors. For use by UI mixins of derived classes.
  176. *
  177. * @param {color} $color
  178. * Grid Cell text color
  179. *
  180. * @param {color} $hovered-color
  181. * Grid Cell text color when hovered
  182. *
  183. * @param {color} $selected-color
  184. * Grid Cell text color when selected
  185. *
  186. * @param {color} $pressed-color
  187. * Grid Cell text color when pressed
  188. *
  189. * @param {color} $background-color
  190. * Grid Cell background-color
  191. *
  192. * @param {color} $hovered-background-color
  193. * Grid Cell background-color when hovered
  194. *
  195. * @param {color} $selected-background-color
  196. * Grid Cell background-color when selected
  197. *
  198. * @param {color} $pressed-background-color
  199. * Grid Cell background-color when pressed
  200. *
  201. * @param {number} $column-border-width
  202. * Grid Cell {@link Ext.grid.Grid#columnLines column} border-width
  203. *
  204. * @param {string} $column-border-style
  205. * Grid Cell {@link Ext.grid.Grid#columnLines column} border-style
  206. *
  207. * @param {color} $column-border-color
  208. * Grid Cell {@link Ext.grid.Grid#columnLines column} border-color
  209. *
  210. * @param {number} $focused-outline-width
  211. * Grid Cell outline-width when focused
  212. *
  213. * @param {string} $focused-outline-style
  214. * Grid Cell outline-style when focused
  215. *
  216. * @param {color} $focused-outline-color
  217. * Grid Cell outline-color when focused
  218. *
  219. * @param {number} $focused-outline-offset
  220. * Grid Cell outline-offset when focused
  221. *
  222. * @param {string/number} $font-weight
  223. * Grid Cell font-weight
  224. *
  225. * @param {number} $font-size
  226. * Grid Cell font-size
  227. *
  228. * @param {number} $font-size-big
  229. * Grid Cell font-size in the {@link Global_CSS#$enable-big big} sizing scheme
  230. *
  231. * @param {number} $line-height
  232. * Grid Cell line-height
  233. *
  234. * @param {number} $line-height-big
  235. * Grid Cell line-height in the {@link Global_CSS#$enable-big big} sizing scheme
  236. *
  237. * @param {string} $font-family
  238. * Grid Cell font-family
  239. *
  240. * @param {number/list} $padding
  241. * Grid Cell padding
  242. *
  243. * @param {number/list} $padding-big
  244. * Grid Cell padding in the {@link Global_CSS#$enable-big big} sizing scheme
  245. *
  246. * @param {string/list} $dirty-icon
  247. * Grid Cell {@link Ext.grid.Grid#markDirty dirty} icon
  248. *
  249. * @param {color} $dirty-icon-color
  250. * Grid Cell {@link Ext.grid.Grid#markDirty dirty} icon color
  251. *
  252. * @param {number} $dirty-icon-size
  253. * Grid Cell {@link Ext.grid.Grid#markDirty dirty} icon size
  254. *
  255. * @param {number} $dirty-icon-size-big
  256. * Grid Cell {@link Ext.grid.Grid#markDirty dirty} icon size in the
  257. * {@link Global_CSS#$enable-big big} sizing scheme
  258. *
  259. * @param {number} $dirty-icon-font-size
  260. * Grid Cell {@link Ext.grid.Grid#markDirty dirty} icon font-size
  261. *
  262. * @param {number} $dirty-icon-font-size-big
  263. * Grid Cell {@link Ext.grid.Grid#markDirty dirty} icon font-size in the
  264. * {@link Global_CSS#$enable-big big} sizing scheme
  265. */
  266. @mixin gridcell-ui(
  267. $ui: null,
  268. $xtype: gridcell,
  269. $color: null,
  270. $hovered-color: null,
  271. $selected-color: null,
  272. $pressed-color: null,
  273. $background-color: null,
  274. $hovered-background-color: null,
  275. $selected-background-color: null,
  276. $pressed-background-color: null,
  277. $column-border-width: null,
  278. $column-border-style: null,
  279. $column-border-color: null,
  280. $focused-outline-width: null,
  281. $focused-outline-style: null,
  282. $focused-outline-color: null,
  283. $focused-outline-offset: null,
  284. $font-weight: null,
  285. $font-size: null,
  286. $font-size-big: null,
  287. $line-height: null,
  288. $line-height-big: null,
  289. $font-family: null,
  290. $padding: null,
  291. $padding-big: null,
  292. $dirty-icon: null,
  293. $dirty-icon-color: null,
  294. $dirty-icon-size: null,
  295. $dirty-icon-size-big: null,
  296. $dirty-icon-font-size: null,
  297. $dirty-icon-font-size-big: null
  298. ) {
  299. $ui-suffix: ui-suffix($ui);
  300. .#{$prefix}#{$xtype}#{$ui-suffix} {
  301. @include font($font-weight, $font-size, $line-height, $font-family);
  302. @if $enable-big {
  303. .#{$prefix}big & {
  304. font-size: $font-size-big;
  305. line-height: $line-height-big;
  306. }
  307. }
  308. color: $color;
  309. background-color: $background-color;
  310. .#{$prefix}column-lines & {
  311. @include border-right($column-border-width, $column-border-style, $column-border-color);
  312. }
  313. &.#{$prefix}hovered {
  314. background-color: $hovered-background-color;
  315. color: $hovered-color;
  316. }
  317. &.#{$prefix}selected {
  318. background-color: $selected-background-color;
  319. color: $selected-color;
  320. }
  321. &.#{$prefix}pressed {
  322. background-color: $pressed-background-color;
  323. color: $pressed-color;
  324. }
  325. .#{$prefix}keyboard-mode &.#{$prefix}focused {
  326. @include outline($focused-outline-width, $focused-outline-style, $focused-outline-color, $focused-outline-offset);
  327. }
  328. .#{$prefix}mark-dirty > * > &.#{$prefix}dirty {
  329. @include icon(
  330. $icon: $dirty-icon,
  331. $color: $dirty-icon-color,
  332. $size: $dirty-icon-size,
  333. $size-big: $dirty-icon-size-big,
  334. $font-size: $dirty-icon-font-size,
  335. $font-size-big: $dirty-icon-font-size-big,
  336. $style-pseudo: true
  337. );
  338. }
  339. }
  340. @include toolable-ui(
  341. $ui: $ui,
  342. $xtype: $xtype,
  343. $padding: $padding,
  344. $padding-big: $padding-big
  345. );
  346. }