Title.scss 8.4 KB

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