_toolbar.scss 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. @mixin extjs-toolbar {
  2. .#{$prefix}toolbar {
  3. font-size: $toolbar-font-size;
  4. // border: 1px solid;
  5. overflow: visible; // Yikes...
  6. .#{$prefix}box-inner {
  7. overflow: visible;
  8. }
  9. padding: $toolbar-vertical-spacing 0 $toolbar-vertical-spacing $toolbar-horizontal-spacing;
  10. .#{$prefix}form-item-label{
  11. font-size: $toolbar-font-size;
  12. line-height: 15px;
  13. }
  14. .#{$prefix}toolbar-item {
  15. margin: 0 $toolbar-horizontal-spacing 0 0;
  16. }
  17. .#{$prefix}toolbar-text {
  18. margin-left: 4px;
  19. margin-right: 6px;
  20. white-space: nowrap;
  21. color: $toolbar-text-color !important;
  22. line-height: $toolbar-text-line-height;
  23. font-family: $toolbar-text-font-family;
  24. font-size: $toolbar-text-font-size;
  25. font-weight: $toolbar-text-font-weight;
  26. }
  27. .#{$prefix}toolbar-separator {
  28. display: block;
  29. font-size: 1px;
  30. overflow: hidden;
  31. cursor: default;
  32. border: 0;
  33. }
  34. .#{$prefix}toolbar-separator-horizontal {
  35. margin: 0 6px 0 1px;
  36. height: 24px;
  37. width: 0px;
  38. border-left: 1px solid $toolbar-separator-color;
  39. border-right: 1px solid $toolbar-separator-highlight-color;
  40. }
  41. }
  42. .#{$prefix}toolbar-docked-top { padding-bottom: 0; }
  43. .#{$prefix}toolbar-docked-bottom { padding-top: 0; }
  44. .#{$prefix}toolbar-docked-left { padding-right: 0; }
  45. .#{$prefix}toolbar-docked-right { padding-left: 0; }
  46. @if $include-ie {
  47. .#{$prefix}quirks .#{$prefix}ie .#{$prefix}toolbar .#{$prefix}toolbar-separator-horizontal {
  48. width: 2px;
  49. }
  50. }
  51. .#{$prefix}toolbar-footer {
  52. background: transparent;
  53. border: 0px none;
  54. margin-top: 3px;
  55. padding: $toolbar-footer-vertical-spacing 0 $toolbar-footer-vertical-spacing $toolbar-footer-horizontal-spacing;
  56. .#{$prefix}box-inner {
  57. border-width: 0;
  58. }
  59. .#{$prefix}toolbar-item {
  60. margin: 0 $toolbar-footer-horizontal-spacing 0 0;
  61. }
  62. }
  63. .#{$prefix}toolbar-vertical {
  64. padding: $toolbar-vertical-spacing $toolbar-horizontal-spacing 0 $toolbar-horizontal-spacing;
  65. .#{$prefix}toolbar-item {
  66. margin: 0 0 $toolbar-horizontal-spacing 0;
  67. }
  68. .#{$prefix}toolbar-text {
  69. margin-top: 4px;
  70. margin-bottom: 6px;
  71. }
  72. .#{$prefix}toolbar-separator-vertical {
  73. margin: 2px 5px 3px 5px;
  74. height: 0px;
  75. width: 10px;
  76. line-height: 0px;
  77. border-top: 1px solid $toolbar-separator-color;
  78. border-bottom: 1px solid $toolbar-separator-highlight-color;
  79. }
  80. }
  81. .#{$prefix}toolbar-scroller {
  82. padding-left: 0;
  83. }
  84. .#{$prefix}toolbar-spacer {
  85. width: $toolbar-spacer-width;
  86. }
  87. // Background for overflow button inserted by the Menu box overflow handler within a toolbar
  88. .#{$prefix}toolbar-more-icon {
  89. background-image: theme-background-image($theme-name, 'toolbar/more.gif') !important;
  90. background-position: 2px center !important;
  91. background-repeat: no-repeat;
  92. }
  93. @include extjs-toolbar-ui(
  94. 'default',
  95. $background-color: $toolbar-background-color,
  96. $background-gradient: $toolbar-background-gradient,
  97. $border-color: $toolbar-border-color
  98. );
  99. //plain toolbars have no border
  100. //by default they get no color, so they are transparent. IE6 doesnt support transparent borders
  101. //so we must set the width to 0.
  102. .#{$prefix}toolbar-plain {
  103. border: 0;
  104. }
  105. .#{$prefix}window .#{$prefix}toolbar {
  106. // border-color: $window-body-border-color;
  107. // @tag question Now what to do about plain attr?
  108. }
  109. }
  110. /**
  111. * @mixin ext-toolbar-ui
  112. * @class Ext.toolbar.Toolbar
  113. * @param {String} $ui The name of the UI
  114. * @param {Color} $background-color The background color of the toolbar (defaults to transparent)
  115. * @param {Gradient/color-stops} $background-gradient The background gradient of the toolbar (defaults to null)
  116. * @param {Color} $border-color The border color of the toolbar (defaults to null)
  117. */
  118. @mixin extjs-toolbar-ui(
  119. $ui,
  120. $background-color: transparent,
  121. $background-gradient: null,
  122. $border-color: null
  123. ) {
  124. .#{$prefix}toolbar-#{$ui} {
  125. @if $border-color != null {
  126. border-color: $border-color;
  127. }
  128. @include background-gradient($background-color, $background-gradient);
  129. }
  130. @if not $supports-gradients or $compile-all {
  131. @if $background-gradient != null {
  132. .#{$prefix}nlg {
  133. .#{$prefix}toolbar-#{$ui} {
  134. background-image: theme-background-image($theme-name, 'toolbar/toolbar-#{$ui}-bg.gif') !important;
  135. background-repeat: repeat-x;
  136. }
  137. }
  138. }
  139. }
  140. }