_toolbar.scss 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /**
  2. * Creates base structure for Toolbar
  3. * @member Ext.toolbar.Toolbar
  4. */
  5. @mixin extjs-toolbar {
  6. .#{$prefix}toolbar {
  7. font-size: $toolbar-font-size;
  8. border: 1px solid;
  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;
  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 3px 0 2px;
  36. height: 14px;
  37. width: 0px;
  38. border-left: 1px solid $toolbar-separator-color;
  39. border-right: 1px solid $toolbar-separator-highlight-color;
  40. }
  41. }
  42. @if $include-ie {
  43. .#{$prefix}quirks .#{$prefix}ie .#{$prefix}toolbar .#{$prefix}toolbar-separator-horizontal {
  44. width: 2px;
  45. }
  46. }
  47. .#{$prefix}toolbar-footer {
  48. background: transparent;
  49. border: 0px none;
  50. margin-top: 3px;
  51. padding: $toolbar-footer-vertical-spacing 0 $toolbar-footer-vertical-spacing $toolbar-footer-horizontal-spacing;
  52. .#{$prefix}box-inner {
  53. border-width: 0;
  54. }
  55. .#{$prefix}toolbar-item {
  56. margin: 0 $toolbar-footer-horizontal-spacing 0 0;
  57. }
  58. }
  59. .#{$prefix}toolbar-vertical {
  60. padding: $toolbar-vertical-spacing $toolbar-horizontal-spacing 0 $toolbar-horizontal-spacing;
  61. .#{$prefix}toolbar-item {
  62. margin: 0 0 $toolbar-horizontal-spacing 0;
  63. }
  64. .#{$prefix}toolbar-text {
  65. margin-top: 4px;
  66. margin-bottom: 6px;
  67. }
  68. .#{$prefix}toolbar-separator-vertical {
  69. margin: 2px 5px 3px 5px;
  70. height: 0px;
  71. width: 10px;
  72. line-height: 0px;
  73. border-top: 1px solid $toolbar-separator-color;
  74. border-bottom: 1px solid $toolbar-separator-highlight-color;
  75. }
  76. }
  77. .#{$prefix}toolbar-scroller {
  78. padding-left: 0;
  79. }
  80. .#{$prefix}toolbar-spacer {
  81. width: $toolbar-spacer-width;
  82. }
  83. // Background for overflow button inserted by the Menu box overflow handler within a toolbar
  84. .#{$prefix}toolbar-more-icon {
  85. background-image: theme-background-image($theme-name, 'toolbar/more.gif') !important;
  86. background-position: 2px center !important;
  87. background-repeat: no-repeat;
  88. }
  89. @include extjs-toolbar-ui(
  90. 'default',
  91. $background-color: $toolbar-background-color,
  92. $background-gradient: $toolbar-background-gradient,
  93. $border-color: $toolbar-border-color
  94. );
  95. //plain toolbars have no border
  96. //by default they get no color, so they are transparent. IE6 doesnt support transparent borders
  97. //so we must set the width to 0.
  98. .#{$prefix}toolbar-plain {
  99. border: 0;
  100. }
  101. }
  102. /**
  103. * Creates a visual theme for an Toolbar.
  104. * @param {String} $ui The name of the UI
  105. * @param {Color} $background-color The background color of the toolbar (defaults to transparent)
  106. * @param {Gradient/color-stops} $background-gradient The background gradient of the toolbar (defaults to null)
  107. * @param {Color} $border-color The border color of the toolbar (defaults to null)
  108. * @member Ext.toolbar.Toolbar
  109. */
  110. @mixin extjs-toolbar-ui(
  111. $ui,
  112. $background-color: transparent,
  113. $background-gradient: null,
  114. $border-color: null
  115. ) {
  116. .#{$prefix}toolbar-#{$ui} {
  117. @if $border-color != null {
  118. border-color: $border-color;
  119. }
  120. @include background-gradient($background-color, $background-gradient);
  121. }
  122. @if not $supports-gradients or $compile-all {
  123. @if $background-gradient != null {
  124. .#{$prefix}nlg {
  125. .#{$prefix}toolbar-#{$ui} {
  126. background-image: theme-background-image($theme-name, 'toolbar/toolbar-#{$ui}-bg.gif') !important;
  127. background-repeat: repeat-x;
  128. }
  129. }
  130. }
  131. }
  132. }