7 $background-color: null,
8 $background-gradient: null,
10 $background-direction: top
14 $cls-ui: $cls + '-' + $ui;
18 @if $background-direction == left or $background-direction == right {
22 $frame-top: max(top($border-radius), right($border-radius));
23 $frame-right: max(right($border-radius), bottom($border-radius));
24 $frame-bottom: max(bottom($border-radius), left($border-radius));
25 $frame-left: max(left($border-radius), top($border-radius));
32 @if $padding == null {
33 $padding-top: $frame-top - top($border-width);
34 $padding-right: $frame-right - right($border-width);
35 $padding-bottom: $frame-bottom - bottom($border-width);
36 $padding-left: $frame-left - left($border-width);
39 $padding-top: top($padding);
40 $padding-right: right($padding);
41 $padding-bottom: bottom($padding);
42 $padding-left: left($padding);
45 @if $padding-top < $frame-top {
46 $padding-top: $frame-top - top($border-width);
48 @if $padding-right < $frame-right {
49 $padding-right: $frame-right - right($border-width);
51 @if $padding-bottom < $frame-bottom {
52 $padding-bottom: $frame-bottom - bottom($border-width);
54 @if $padding-left < $frame-left {
55 $padding-left: $frame-left - left($border-width);
58 .#{$prefix}#{$cls-ui} {
59 @if $supports-border-radius {
60 @if length($border-radius) == 2 {
61 @include border-top-left-radius(nth($border-radius, 1));
62 @include border-top-right-radius(nth($border-radius, 2));
63 } @else if length($border-radius) == 3 {
64 @include border-top-left-radius(nth($border-radius, 1));
65 @include border-top-right-radius(nth($border-radius, 2));
66 @include border-bottom-right-radius(nth($border-radius, 3));
67 } @else if length($border-radius) == 4 {
68 @include border-top-left-radius(nth($border-radius, 1));
69 @include border-top-right-radius(nth($border-radius, 2));
70 @include border-bottom-right-radius(nth($border-radius, 3));
71 @include border-bottom-left-radius(nth($border-radius, 4));
73 @include border-radius($border-radius);
76 padding: $padding-top $padding-right $padding-bottom $padding-left;
77 border-width: $border-width;
79 @if $background-color != null {
80 @if $supports-gradients and $background-gradient != null {
81 @include background-gradient($background-color, $background-gradient, $background-direction);
84 background-color: $background-color;
89 @if not $supports-gradients or $compile-all {
91 .#{$prefix}#{$cls-ui}-mc {
92 @if $background-gradient != null {
93 @include theme-background-image($theme-name, '#{$cls}/#{$cls-ui}-bg.gif', false, $relative-image-path-for-uis);
95 @if $background-color != null {
96 background-color: $background-color;
102 @if not $supports-border-radius or $compile-all {
104 .#{$prefix}#{$cls-ui} {
105 padding: 0 !important;
106 border-width: 0 !important;
107 @include border-radius(0px);
108 @if $background-color != null {
109 background-color: transparent;
115 @function pad($radius) {
116 $radius: boxmax($radius);
117 $radius: parseint($radius);
122 @return "0" + $radius;
131 @if $vertical == true {
135 $left: $type + pad(top($border-radius)) + pad(right($border-radius)) + 'px';
136 $top: $direction + pad(bottom($border-radius)) + pad(left($border-radius)) + 'px';
137 background-position: unquote($left) unquote($top);
140 .#{$prefix}#{$cls-ui}-tl,
141 .#{$prefix}#{$cls-ui}-bl,
142 .#{$prefix}#{$cls-ui}-tr,
143 .#{$prefix}#{$cls-ui}-br,
144 .#{$prefix}#{$cls-ui}-tc,
145 .#{$prefix}#{$cls-ui}-bc,
146 .#{$prefix}#{$cls-ui}-ml,
147 .#{$prefix}#{$cls-ui}-mr {
150 @if $background-color != transparent {
151 @include theme-background-image($theme-name, '#{$cls}/#{$cls-ui}-corners.gif', false, $relative-image-path-for-uis);
155 @if $vertical == true {
156 .#{$prefix}#{$cls-ui}-tc,
157 .#{$prefix}#{$cls-ui}-bc {
160 @if $background-color != transparent {
161 @include theme-background-image($theme-name, '#{$cls}/#{$cls-ui}-sides.gif', false, $relative-image-path-for-uis);
162 background-position: 0 0;
163 background-repeat: repeat-x;
167 .#{$prefix}#{$cls-ui}-ml,
168 .#{$prefix}#{$cls-ui}-mr {
171 @if $background-color != transparent {
172 @include theme-background-image($theme-name, '#{$cls}/#{$cls-ui}-sides.gif', false, $relative-image-path-for-uis);
173 background-position: 0 0;
174 @if $background-gradient == null {
175 background-repeat: repeat-y;
181 $padding-top: $padding-top - $frame-top;
182 $padding-right: $padding-right - $frame-right;
183 $padding-bottom: $padding-bottom - $frame-bottom;
184 $padding-left: $padding-left - $frame-left;
187 @if $padding-top < 0 {
190 @if $padding-right < 0 {
193 @if $padding-bottom < 0 {
196 @if $padding-left < 0 {
200 .#{$prefix}#{$cls-ui}-mc {
201 padding: $padding-top $padding-right $padding-bottom $padding-left;