fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

294 lines
7.5 KiB

8 years ago
.text-shadow(none) {
8 years ago
text-shadow: none;
-moz-text-shadow: none;
-webkit-text-shadow: none;
}
8 years ago
.text-shadow(@x, @y, @blur, @color) when not (@x = none) {
8 years ago
text-shadow: @arguments;
-moz-text-shadow: @arguments;
-webkit-text-shadow: @arguments;
}
8 years ago
.box-shadow(none) {
8 years ago
box-shadow: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
}
8 years ago
8 years ago
.box-shadow(@style, @c) when (iscolor(@c)) {
-webkit-box-shadow: @style @c;
-moz-box-shadow: @style @c;
box-shadow: @style @c;
}
8 years ago
8 years ago
.box-shadow(@x, @y, @blur, @spreed: 0px, @color, @inset: outset) when (iscolor(@color)) and (isnumber(unit(@spreed))){
box-shadow: @arguments;
-webkit-box-shadow: @arguments;
-moz-box-shadow: @arguments;
}
8 years ago
.background-color(@color, @alpha) {
background-color: fade(@color, @alpha);
@ieColor: argb(fade(@color, @alpha));
filter: ~"progid:DXImageTransform.Microsoft.gradient(startColorstr=@{ieColor},endColorstr=@{ieColor})";
}
8 years ago
.opacity(@opa) {
8 years ago
opacity: @opa;
8 years ago
@opa-ie: @opa*100;
8 years ago
filter: ~'alpha(opacity=@{opa-ie})';
}
8 years ago
.transition(@transition) {
-webkit-transition: @transition;
-moz-transition: @transition;
-o-transition: @transition;
transition: @transition;
}
8 years ago
//渐变
8 years ago
.gradient(@start, @end) {
background: @start; //不支持的用这个
8 years ago
background: -webkit-gradient(linear, 0 0, 0 100%, from(@start) to(@end)); /*old webkit*/
background: -webkit-linear-gradient(@start, @end); /*new webkit*/
background: -moz-linear-gradient(@start, @end); /*gecko*/
background: -ms-linear-gradient(@start, @end); /*IE10 preview*/
background: -o-linear-gradient(@start, @end); /*opera 11.10+*/
background: linear-gradient(@start, @end); /*future CSS3 browsers*/
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='@{start}', endColorstr='@{end}', GradientType='0');
}
8 years ago
// toSide表示渐变的方向, 使用角度兼容性好一些
.gradient(@toSide, @start, @end) when not (@toSide = none) {
background: @start; //不支持的用这个
background: -webkit-gradient(linear, 0 0, 0 100%, from(@start) to(@end)); /*old webkit*/
background: -webkit-linear-gradient(@toSide, @start, @end); /*new webkit*/
background: -moz-linear-gradient(@toSide, @start, @end); /*gecko*/
background: -ms-linear-gradient(@toSide, @start, @end); /*IE10 preview*/
background: -o-linear-gradient(@toSide, @start, @end); /*opera 11.10+*/
background: linear-gradient(@toSide, @start, @end); /*future CSS3 browsers*/
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='@{start}', endColorstr='@{end}', GradientType='0');
}
8 years ago
.border-radius(@radius: 5px) {
8 years ago
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
8 years ago
.border-corner-top-radius(@leftTop, @rightTop) {
8 years ago
-moz-border-radius-topleft: @leftTop;
-webkit-border-top-left-radius: @leftTop;
-moz-border-radius-topright: @rightTop;
-webkit-border-top-right-radius: @rightTop;
8 years ago
border-top-left-radius: @leftTop;
border-top-right-radius: @rightTop;
8 years ago
}
8 years ago
.border-corner-bottom-radius(@leftBottom, @rightBottom) {
8 years ago
-moz-border-radius-bottomleft: @rightBottom;
-webkit-border-bottom-left-radius: @rightBottom;
-moz-border-radius-bottomright: @leftBottom;
-webkit-border-bottom-right-radius: @rightBottom;
8 years ago
border-bottom-right-radius: @rightBottom;
border-bottom-left-radius: @leftBottom;
8 years ago
}
8 years ago
.border-corner-left-radius(@leftTop, @leftBottom) {
8 years ago
-moz-border-radius-topleft: @leftTop;
-webkit-border-top-left-radius: @leftTop;
-moz-border-radius-bottomleft: @leftBottom;
-webkit-border-bottom-left-radius: @leftBottom;
8 years ago
border-top-left-radius: @leftTop;
border-bottom-left-radius: @leftBottom;
8 years ago
}
8 years ago
.border-corner-right-radius(@rightTop, @rightBottom) {
8 years ago
-moz-border-radius-topright: @rightTop;
-webkit-border-top-right-radius: @rightTop;
-moz-border-radius-bottomright: @rightBottom;
-webkit-border-bottom-right-radius: @rightBottom;
8 years ago
border-top-right-radius: @rightTop;
border-bottom-right-radius: @rightBottom;
8 years ago
}
8 years ago
.border-corner-radius(@leftTop, @rightTop, @rightBottom, @leftBottom) {
8 years ago
-webkit-border-radius: @arguments;
-moz-border-radius: @arguments;
border-radius: @arguments;
8 years ago
}
@sideHeight: 6px;
@sideLength: 12px;
.solid-triangle-up(@color) {
width: 0;
height: 0;
border-left: (@sideLength/2) solid transparent;
border-right: (@sideLength/2) solid transparent;
border-bottom: @sideHeight solid @color;
}
.solid-triangle-down(@color) {
width: 0;
height: 0;
border-left: (@sideLength/2) solid transparent;
border-right: (@sideLength/2) solid transparent;
border-top: @sideHeight solid @color;
}
.solid-triangle-left(@color) {
width: 0;
height: 0;
border-top: (@sideLength/2) solid transparent;
border-right: @sideHeight solid @color;
border-bottom: (@sideLength/2) solid transparent;
}
.solid-triangle-right(@color) {
width: 0;
height: 0;
border-top: (@sideLength/2) solid transparent;
border-left: @sideHeight solid @color;
border-bottom: (@sideLength/2) solid transparent;
}
.solid-triangle-top-left(@color) {
width: 0;
height: 0;
border-top: @sideHeight solid @color;
border-right: @sideHeight solid transparent;
}
.solid-triangle-top-right(@color) {
width: 0;
height: 0;
border-top: @sideHeight solid @color;
border-left: @sideHeight solid transparent;
}
.solid-triangle-bottom-left(@color) {
width: 0;
height: 0;
border-bottom: @sideHeight solid @color;
border-right: @sideHeight solid transparent;
}
.solid-triangle-bottom-right(@color) {
width: 0;
height: 0;
border-bottom: @sideHeight solid @color;
border-left: @sideHeight solid transparent;
}
.triangle-top() {
position: absolute;
width: 16px;
height: 5px;
border-bottom: 1px solid #ffffff;
8 years ago
&:before {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
border-bottom: 7px solid #ccc;
8 years ago
border-left: 8px solid transparent;
border-right: 8px solid transparent;
content: "";
}
&:after {
position: absolute;
right: 1px;
top: 1px;
bottom: 0px;
border-bottom: 6px solid #ffffff;
8 years ago
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
}
}
.triangle-bottom() {
position: absolute;
width: 16px;
height: 10px;
border-top: 1px solid #ffffff;
8 years ago
&:after {
position: absolute;
right: 1px;
top: 0px;
border-top: 6px solid #ffffff;
8 years ago
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
}
&:before {
position: absolute;
border-top: 7px solid #cccccc;
8 years ago
border-left: 8px solid transparent;
border-right: 8px solid transparent;
content: "";
}
}
.triangle-left() {
position: absolute;
6 years ago
width: 7px;
height: 16px;
&:before {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
6 years ago
border-right: 7px solid #ccc;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
&:after {
position: absolute;
6 years ago
right: 0px;
top: 0px;
bottom: 0px;
6 years ago
border-right: 7px solid #ffffff;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
}
.triangle-right() {
position: absolute;
6 years ago
width: 5px;
height: 16px;
border-left: 1px solid #f5f5f5;
&:before {
position: absolute;
6 years ago
left: 0px;
top: 0px;
right: 0px;
6 years ago
border-left: 7px solid #ccc;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
&:after {
position: absolute;
top: 1px;
6 years ago
left: 1px;
right: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
}
8 years ago
}