X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/resources/themes/stylesheets/ext4/default/widgets/_button.scss diff --git a/resources/themes/stylesheets/ext4/default/widgets/_button.scss b/resources/themes/stylesheets/ext4/default/widgets/_button.scss new file mode 100644 index 00000000..acdcdbae --- /dev/null +++ b/resources/themes/stylesheets/ext4/default/widgets/_button.scss @@ -0,0 +1,519 @@ +/** + * @class Ext.Button + * Used to create the base structure of an Ext.Button + */ +@mixin extjs-button { + .#{$prefix}btn { + display: inline-block; + zoom: 1; + *display: inline; + position: relative; + + cursor: pointer; + cursor: hand; + + white-space: nowrap; + + vertical-align: middle; + + * { + cursor: pointer; + cursor: hand; + } + + background-repeat: no-repeat; + + em { + background-repeat: no-repeat; + + // Styles for an anchor button. + a { + text-decoration: none; + display: inline-block; + color: inherit; + } + } + + button { + margin: 0; + padding: 0; + border: 0; + width: auto; + background: none; + outline: 0 none; + overflow: hidden; + vertical-align: bottom; + -webkit-appearance: none; + + &::-moz-focus-inner { + border: 0; + padding: 0; + } + } + + .#{$prefix}btn-inner { + display: block; + white-space: nowrap; + text-align: center; + background-color: transparent; + background-repeat: no-repeat; + background-position: left center; + } + } + + .#{$prefix}btn-disabled { + @include opacity(1); + } + + .#{$prefix}btn-disabled span { + @include opacity(.5); + } + + //remove the opacity rule of IE6. + .#{$prefix}ie6 .#{$prefix}btn-disabled, + .#{$prefix}ie6 .#{$prefix}btn-disabled span { + filter:none; + } + + @if $include-ie { + * html .#{$prefix}ie { + .#{$prefix}btn button { + width: 1px; + } + } + + .#{$prefix}ie .#{$prefix}btn button { + overflow-x: visible; /*prevents extra horiz space in IE*/ + vertical-align: baseline; /*IE doesn't like bottom*/ + } + + .#{$prefix}strict .#{$prefix}ie6, + .#{$prefix}strict .#{$prefix}ie7 { + .#{$prefix}btn .#{$prefix}frame-mc { + height: 100%; + } + } + } + + @if not $supports-border-radius or $compile-all { + .#{$prefix}nbr { + .#{$prefix}btn { + .#{$prefix}frame-mc { + vertical-align: middle; + white-space: nowrap; + text-align: center; + cursor: pointer; + } + } + } + } + + .#{$prefix}btn-icon-text-right .#{$prefix}btn-inner { + background-position: right center; + } + + .#{$prefix}btn-icon-text-top .#{$prefix}btn-inner { + background-position: center top; + } + + .#{$prefix}btn-icon-text-bottom .#{$prefix}btn-inner { + background-position: center bottom; + } + + .#{$prefix}btn-arrow-right { + background: transparent no-repeat right center; + padding-right: $button-arrow-size; + + .#{$prefix}btn-inner { + padding-right: 0 !important; + } + } + + .#{$prefix}toolbar .#{$prefix}btn-arrow-right { + padding-right: $button-toolbar-arrow-size; + } + + .#{$prefix}btn-arrow-bottom { + background: transparent no-repeat center bottom; + padding-bottom: $button-arrow-size; + } + + .#{$prefix}btn-arrow { + background-image: theme-image($theme-name, 'button/arrow.gif'); + display: block; + } + + + //split buttons + .#{$prefix}btn-split-right, + .#{$prefix}btn-over .#{$prefix}btn-split-right { + background: transparent theme-image($theme-name, 'button/s-arrow.gif') no-repeat right center; + padding-right: $button-split-size !important; + } + + .#{$prefix}btn-split-bottom, + .#{$prefix}btn-over .#{$prefix}btn-split-bottom { + background: transparent theme-image($theme-name, 'button/s-arrow-b.gif') no-repeat center bottom; + padding-bottom: $button-split-size; + } + + .#{$prefix}toolbar .#{$prefix}btn-split-right { + background-image: theme-image($theme-name, 'button/s-arrow-noline.gif'); + padding-right: $button-toolbar-split-size !important; + } + + .#{$prefix}toolbar .#{$prefix}btn-split-bottom { + background-image: theme-image($theme-name, 'button/s-arrow-b-noline.gif'); + } + + .#{$prefix}btn-split { + display: block; + } + + .#{$prefix}item-disabled, + .#{$prefix}item-disabled * { + cursor: default; + } + + .#{$prefix}cycle-fixed-width .#{$prefix}btn-inner { + text-align: inherit; + } + + .#{$prefix}btn-over .#{$prefix}btn-split-right { background-image: theme-image($theme-name, 'button/s-arrow-o.gif'); } + .#{$prefix}btn-over .#{$prefix}btn-split-bottom { background-image: theme-image($theme-name, 'button/s-arrow-bo.gif'); } + + @include x-btn( + /* UI + Scale */ + 'default-small', + + $button-small-border-radius, + $button-small-border-width, + + $button-default-border-color, + $button-default-border-color-over, + $button-default-border-color-focus, + $button-default-border-color-pressed, + $button-default-border-color-disabled, + + $button-small-padding, + $button-small-text-padding, + + $button-default-background-color, + $button-default-background-color-over, + $button-default-background-color-focus, + $button-default-background-color-pressed, + $button-default-background-color-disabled, + + $button-default-background-gradient, + $button-default-background-gradient-over, + $button-default-background-gradient-focus, + $button-default-background-gradient-pressed, + $button-default-background-gradient-disabled, + + $button-default-color, + $button-default-color-over, + $button-default-color-focus, + $button-default-color-pressed, + $button-default-color-disabled, + + $button-small-font-size, + $button-small-font-size-over, + $button-small-font-size-focus, + $button-small-font-size-pressed, + $button-small-font-size-disabled, + + $button-small-font-weight, + $button-small-font-weight-over, + $button-small-font-weight-focus, + $button-small-font-weight-pressed, + $button-small-font-weight-disabled, + + $button-small-font-family, + $button-small-font-family-over, + $button-small-font-family-focus, + $button-small-font-family-pressed, + $button-small-font-family-disabled, + + $button-small-icon-size + ); + + @include x-btn( + 'default-medium', + + $button-medium-border-radius, + $button-medium-border-width, + + $button-default-border-color, + $button-default-border-color-over, + $button-default-border-color-focus, + $button-default-border-color-pressed, + $button-default-border-color-disabled, + + $button-medium-padding, + $button-medium-text-padding, + + $button-default-background-color, + $button-default-background-color-over, + $button-default-background-color-focus, + $button-default-background-color-pressed, + $button-default-background-color-disabled, + + $button-default-background-gradient, + $button-default-background-gradient-over, + $button-default-background-gradient-focus, + $button-default-background-gradient-pressed, + $button-default-background-gradient-disabled, + + $button-default-color, + $button-default-color-over, + $button-default-color-focus, + $button-default-color-pressed, + $button-default-color-disabled, + + $button-medium-font-size, + $button-medium-font-size-over, + $button-medium-font-size-focus, + $button-medium-font-size-pressed, + $button-medium-font-size-disabled, + + $button-medium-font-weight, + $button-medium-font-weight-over, + $button-medium-font-weight-focus, + $button-medium-font-weight-pressed, + $button-medium-font-weight-disabled, + + $button-medium-font-family, + $button-medium-font-family-over, + $button-medium-font-family-focus, + $button-medium-font-family-pressed, + $button-medium-font-family-disabled, + + $button-medium-icon-size + ); + + @include x-btn( + 'default-large', + + $button-large-border-radius, + $button-large-border-width, + + $button-default-border-color, + $button-default-border-color-over, + $button-default-border-color-focus, + $button-default-border-color-pressed, + $button-default-border-color-disabled, + + $button-large-padding, + $button-large-text-padding, + + $button-default-background-color, + $button-default-background-color-over, + $button-default-background-color-focus, + $button-default-background-color-pressed, + $button-default-background-color-disabled, + + $button-default-background-gradient, + $button-default-background-gradient-over, + $button-default-background-gradient-focus, + $button-default-background-gradient-pressed, + $button-default-background-gradient-disabled, + + $button-default-color, + $button-default-color-over, + $button-default-color-focus, + $button-default-color-pressed, + $button-default-color-disabled, + + $button-large-font-size, + $button-large-font-size-over, + $button-large-font-size-focus, + $button-large-font-size-pressed, + $button-large-font-size-disabled, + + $button-large-font-weight, + $button-large-font-weight-over, + $button-large-font-weight-focus, + $button-large-font-weight-pressed, + $button-large-font-weight-disabled, + + $button-large-font-family, + $button-large-font-family-over, + $button-large-font-family-focus, + $button-large-font-family-pressed, + $button-large-font-family-disabled, + + $button-large-icon-size + ); + + @include x-btn( + 'default-toolbar-small', + + $button-small-border-radius, + $button-small-border-width, + + $button-toolbar-border-color, + $button-toolbar-border-color-over, + $button-toolbar-border-color-focus, + $button-toolbar-border-color-pressed, + $button-toolbar-border-color-disabled, + + $button-small-padding, + $button-small-text-padding, + + $button-toolbar-background-color, + $button-toolbar-background-color-over, + $button-toolbar-background-color-focus, + $button-toolbar-background-color-pressed, + $button-toolbar-background-color-disabled, + + $button-toolbar-background-gradient, + $button-toolbar-background-gradient-over, + $button-toolbar-background-gradient-focus, + $button-toolbar-background-gradient-pressed, + $button-toolbar-background-gradient-disabled, + + $button-toolbar-color, + $button-toolbar-color-over, + $button-toolbar-color-focus, + $button-toolbar-color-pressed, + $button-toolbar-color-disabled, + + $button-small-font-size, + $button-small-font-size-over, + $button-small-font-size-focus, + $button-small-font-size-pressed, + $button-small-font-size-disabled, + + $button-small-font-weight, + $button-small-font-weight-over, + $button-small-font-weight-focus, + $button-small-font-weight-pressed, + $button-small-font-weight-disabled, + + $button-small-font-family, + $button-small-font-family-over, + $button-small-font-family-focus, + $button-small-font-family-pressed, + $button-small-font-family-disabled, + + $button-small-icon-size + ); + + @include x-btn( + 'default-toolbar-medium', + + $button-medium-border-radius, + $button-medium-border-width, + + $button-toolbar-border-color, + $button-toolbar-border-color-over, + $button-toolbar-border-color-focus, + $button-toolbar-border-color-pressed, + $button-toolbar-border-color-disabled, + + $button-medium-padding, + $button-medium-text-padding, + + $button-toolbar-background-color, + $button-toolbar-background-color-over, + $button-toolbar-background-color-focus, + $button-toolbar-background-color-pressed, + $button-toolbar-background-color-disabled, + + $button-toolbar-background-gradient, + $button-toolbar-background-gradient-over, + $button-toolbar-background-gradient-focus, + $button-toolbar-background-gradient-pressed, + $button-toolbar-background-gradient-disabled, + + $button-toolbar-color, + $button-toolbar-color-over, + $button-toolbar-color-focus, + $button-toolbar-color-pressed, + $button-toolbar-color-disabled, + + $button-medium-font-size, + $button-medium-font-size-over, + $button-medium-font-size-focus, + $button-medium-font-size-pressed, + $button-medium-font-size-disabled, + + $button-medium-font-weight, + $button-medium-font-weight-over, + $button-medium-font-weight-focus, + $button-medium-font-weight-pressed, + $button-medium-font-weight-disabled, + + $button-medium-font-family, + $button-medium-font-family-over, + $button-medium-font-family-focus, + $button-medium-font-family-pressed, + $button-medium-font-family-disabled, + + $button-medium-icon-size + ); + + @include x-btn( + 'default-toolbar-large', + + $button-large-border-radius, + $button-large-border-width, + + $button-toolbar-border-color, + $button-toolbar-border-color-over, + $button-toolbar-border-color-focus, + $button-toolbar-border-color-pressed, + $button-toolbar-border-color-disabled, + + $button-large-padding, + $button-large-text-padding, + + $button-toolbar-background-color, + $button-toolbar-background-color-over, + $button-toolbar-background-color-focus, + $button-toolbar-background-color-pressed, + $button-toolbar-background-color-disabled, + + $button-toolbar-background-gradient, + $button-toolbar-background-gradient-over, + $button-toolbar-background-gradient-focus, + $button-toolbar-background-gradient-pressed, + $button-toolbar-background-gradient-disabled, + + $button-toolbar-color, + $button-toolbar-color-over, + $button-toolbar-color-focus, + $button-toolbar-color-pressed, + $button-toolbar-color-disabled, + + $button-large-font-size, + $button-large-font-size-over, + $button-large-font-size-focus, + $button-large-font-size-pressed, + $button-large-font-size-disabled, + + $button-large-font-weight, + $button-large-font-weight-over, + $button-large-font-weight-focus, + $button-large-font-weight-pressed, + $button-large-font-weight-disabled, + + $button-large-font-family, + $button-large-font-family-over, + $button-large-font-family-focus, + $button-large-font-family-pressed, + $button-large-font-family-disabled, + + $button-large-icon-size + ); + + .#{$prefix}btn-default-toolbar-small-disabled, + .#{$prefix}btn-default-toolbar-medium-disabled, + .#{$prefix}btn-default-toolbar-large-disabled { + border-color: transparent; + + background-image: none; + background: transparent; + } + +} \ No newline at end of file