3.0 source code
This commit is contained in:
465
OfficeWeb/apps/common/main/resources/less/buttons.less
Normal file
465
OfficeWeb/apps/common/main/resources/less/buttons.less
Normal file
@@ -0,0 +1,465 @@
|
||||
.btn {
|
||||
border-radius: 1px;
|
||||
|
||||
.btnsize(@value) {
|
||||
min-width: @value;
|
||||
height: @value;
|
||||
line-height: @value - 2px;
|
||||
}
|
||||
|
||||
&.small {
|
||||
.btnsize(20px);
|
||||
}
|
||||
|
||||
&.normal {
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
&.large {
|
||||
.btnsize(31px);
|
||||
}
|
||||
|
||||
&.huge {
|
||||
.btnsize(37px);
|
||||
}
|
||||
|
||||
&.x-huge {
|
||||
.btnsize(45px);
|
||||
}
|
||||
|
||||
&[disabled] {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: 0;
|
||||
outline-offset: 0;
|
||||
}
|
||||
|
||||
&:active, &.active {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.caret {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border: 0;
|
||||
background-repeat: no-repeat;
|
||||
background-position: @arrow-small-offset-x @arrow-small-offset-y;
|
||||
position: relative;
|
||||
.background-ximage('@{common-image-path}/@{common-controls}', '@{common-image-path}/@{common-controls2x}', 100px)
|
||||
}
|
||||
|
||||
//&:active,
|
||||
&:active:not(.disabled),
|
||||
&.active:not(.disabled){
|
||||
.caret {
|
||||
background-position: @arrow-small-offset-x - 7px @arrow-small-offset-y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-toolbar {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
.border-radius(1px);
|
||||
background-color: transparent;
|
||||
|
||||
&:before,
|
||||
&:after {
|
||||
content: "";
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: 0;
|
||||
outline-offset: 0;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
.over {
|
||||
outline: 0;
|
||||
background-color: @secondary;
|
||||
}
|
||||
|
||||
|
||||
&:active:not(.disabled),
|
||||
&.active:not(.disabled) {
|
||||
outline: 0;
|
||||
color: lighten(@gray-lighter, 10%);
|
||||
background-color: @primary;
|
||||
}
|
||||
|
||||
span.btn-icon {
|
||||
.position();
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
background-repeat: no-repeat;
|
||||
.background-ximage('@{app-image-path}/toolbar-menu.png', '@{app-image-path}/toolbar-menu@2x.png', 60px);
|
||||
}
|
||||
|
||||
// Normal size
|
||||
// ------------------------
|
||||
&.btn-toolbar-default {
|
||||
.btn.small;
|
||||
|
||||
&.dropdown-toggle {
|
||||
min-width: 7px;
|
||||
padding-left: 1px;
|
||||
padding-right: 1px;
|
||||
}
|
||||
|
||||
span.btn-icon {
|
||||
width: 20px !important;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
// Large size
|
||||
// ------------------------
|
||||
&.btn-toolbar-large {
|
||||
.btn.large;
|
||||
|
||||
&.dropdown-toggle {
|
||||
min-width: 7px;
|
||||
padding-left: 1px;
|
||||
padding-right: 1px;
|
||||
}
|
||||
|
||||
span.btn-icon {
|
||||
width: 30px !important;
|
||||
height: 30px;
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
// Button has color line
|
||||
// ------------------------
|
||||
.btn-color-value-line {
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
left: 3px;
|
||||
bottom: 2px;
|
||||
width: 14px;
|
||||
height: 3px;
|
||||
background-color: red;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-category {
|
||||
.btn.large;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
display: block;
|
||||
position: relative;
|
||||
.border-radius(0);
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
|
||||
&:hover,
|
||||
.over {
|
||||
outline: 0;
|
||||
background-color: @secondary;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
outline: 0;
|
||||
background-color: @primary;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
span.btn-icon {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
background-repeat: no-repeat;
|
||||
.background-ximage('@{app-image-path}/toolbar-menu.png', '@{app-image-path}/toolbar-menu@2x.png', 60px)
|
||||
}
|
||||
|
||||
&[disabled],
|
||||
&.disabled {
|
||||
color: #000;
|
||||
opacity: 0.4;
|
||||
}
|
||||
}
|
||||
|
||||
// The clickable button for toggling the menu
|
||||
// Remove the gradient and set the same inset shadow as the :active state
|
||||
.btn-group {
|
||||
> .btn-toolbar {
|
||||
float: none;
|
||||
}
|
||||
|
||||
&.open {
|
||||
> .btn-toolbar {
|
||||
&.btn-toolbar-default,
|
||||
&.btn-toolbar-large {
|
||||
color: lighten(@gray-lighter, 10%);
|
||||
|
||||
// Show no shadow for `.btn-link` since it has no other button styles.
|
||||
&.btn-link {
|
||||
.box-shadow(none);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-toggle {
|
||||
.box-shadow(none);
|
||||
}
|
||||
}
|
||||
|
||||
&.over {
|
||||
> button {
|
||||
outline: 0;
|
||||
background-color: @secondary;
|
||||
}
|
||||
}
|
||||
|
||||
&.open,
|
||||
&.over {
|
||||
&.split {
|
||||
> button:first-child {
|
||||
z-index: 3;
|
||||
.box-inner-shadow(-1px 0 0 0 @gray-light);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&:not(.split) {
|
||||
.btn-toolbar {
|
||||
&.btn-toolbar-default {
|
||||
&.dropdown-toggle {
|
||||
width: 100%;
|
||||
min-width: 28px;
|
||||
|
||||
.caret {
|
||||
// float: right;
|
||||
position: relative;
|
||||
right: -8px;
|
||||
}
|
||||
}
|
||||
|
||||
&.btn-text-value {
|
||||
.caret {
|
||||
margin: 6px 3px 6px 0;
|
||||
}
|
||||
.caption {
|
||||
vertical-align: middle
|
||||
}
|
||||
&[disabled],
|
||||
&.disabled {
|
||||
opacity: 0.65;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.btn-toolbar-large {
|
||||
&.dropdown-toggle {
|
||||
width: 100%;
|
||||
min-width: 40px;
|
||||
|
||||
.caret {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-color {
|
||||
padding: 2px;
|
||||
border:1px solid @input-border;
|
||||
.border-radius(@border-radius-small);
|
||||
|
||||
span {
|
||||
display:block;
|
||||
border:1px solid @input-border;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&,
|
||||
&:hover,
|
||||
.over,
|
||||
&:active,
|
||||
&.active {
|
||||
outline: 0;
|
||||
background: #ffffff !important;
|
||||
.box-shadow(none) !important;
|
||||
}
|
||||
|
||||
&[disabled],
|
||||
&.disabled {
|
||||
opacity: 0.35;
|
||||
}
|
||||
|
||||
.transparent {
|
||||
.background-ximage('@{common-image-path}/hsbcolorpicker/transparency_39x15.png', '@{common-image-path}/hsbcolorpicker/transparency_39x15@2x.png', 39px);
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center center;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-options {
|
||||
padding: 0;
|
||||
margin:0;
|
||||
border: 0 none;
|
||||
.box-shadow(none);
|
||||
background-color: transparent;
|
||||
|
||||
span.btn-icon {
|
||||
position: relative;
|
||||
min-width: inherit;
|
||||
height: inherit;
|
||||
line-height: inherit;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: inline-block;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
.over,
|
||||
&:active,
|
||||
&.active {
|
||||
outline: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-text-default {
|
||||
width: 75px;
|
||||
height: 22px;
|
||||
background: @input-bg;
|
||||
border: 1px solid @input-border;
|
||||
.border-radius(@border-radius-small);
|
||||
|
||||
&:hover,
|
||||
.over {
|
||||
outline: 0;
|
||||
background-color: @secondary !important;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
outline: 0;
|
||||
background-color: @primary !important;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-icon-default {
|
||||
width: 45px;
|
||||
height: 22px;
|
||||
background: @input-bg;
|
||||
border: 1px solid @input-border;
|
||||
.border-radius(@border-radius-small);
|
||||
|
||||
span.btn-icon {
|
||||
width: 28px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
.over {
|
||||
outline: 0;
|
||||
background-color: @secondary !important;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
outline: 0;
|
||||
background-color: @primary !important;
|
||||
}
|
||||
|
||||
&[disabled],
|
||||
&.disabled {
|
||||
opacity: 0.65;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-large-dataview {
|
||||
display: inline-block;
|
||||
width: 72px;
|
||||
height: 58px;
|
||||
padding: 2px;
|
||||
margin:0;
|
||||
box-shadow: none;
|
||||
background-color: @input-bg;
|
||||
border: 1px solid @input-border;
|
||||
.border-radius(@border-radius-small);
|
||||
|
||||
span.btn-icon {
|
||||
display: inline-block;
|
||||
.btn.btnsize(52px);
|
||||
padding: 0;
|
||||
margin-right: 3px;
|
||||
background-color: transparent;
|
||||
background-repeat: no-repeat;
|
||||
border: 1px solid @input-border;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
.over,
|
||||
&:active,
|
||||
&.active {
|
||||
outline: 0;
|
||||
background-color: @input-bg !important;
|
||||
}
|
||||
|
||||
&:active:not(.disabled),
|
||||
&.active:not(.disabled) {
|
||||
.caret {
|
||||
background-position: @arrow-small-offset-x @arrow-small-offset-y;
|
||||
}
|
||||
}
|
||||
|
||||
&[disabled],
|
||||
&.disabled {
|
||||
opacity: 0.65;
|
||||
}
|
||||
}
|
||||
|
||||
// Dialog buttons
|
||||
// ------------------------
|
||||
|
||||
.dlg-btn {
|
||||
font-weight: bold;
|
||||
width: 86px;
|
||||
color: @gray-deep;
|
||||
background-color: @secondary;
|
||||
|
||||
&:hover,
|
||||
&.hover {
|
||||
background-color: @secondary-hover;
|
||||
}
|
||||
|
||||
&.primary {
|
||||
color: #fff;
|
||||
background-color: @primary;
|
||||
|
||||
&:hover,
|
||||
&.hover {
|
||||
background-color: @primary-hover;
|
||||
}
|
||||
}
|
||||
|
||||
&[disabled] {
|
||||
opacity: 0.65;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user