This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0
wcui/css/basic-elem.scss

210 lines
9.0 KiB
SCSS
Raw Normal View History

2017-07-11 17:40:45 +08:00
@charset "UTF-8";
/**
*
* @authors yutent (yutent@doui.cc)
* @date 2017-05-20 21:35:30
* @version $Id$
*/
@import "var.scss";
2017-07-11 17:40:45 +08:00
/*--------各种按钮---------*/
.do-ui-button {display:inline-block;padding:0 5px;border:1px solid #ddd;text-align:center;font-size:12px;background:none;cursor:pointer;@include ts;
2017-07-11 17:40:45 +08:00
&.medium {min-width:100px;height:35px;padding:0 8px;line-height:35px;font-size:15px}
&.large {min-width:150px;height:50px;padding:0 13px;line-height:50px;font-size:18px;}
2017-07-11 17:40:45 +08:00
&.radius-3 {border-radius:3px;}
&.radius-5 {border-radius:5px;}
&.teal {border:0;background:nth($ct, 1);color:#fff;}
&.teal:hover {background:nth($ct, 2);}
&.teal:active {background:nth($ct, 3);}
&.green {border:0;background:nth($cg, 1);color:#fff;}
2017-07-11 17:40:45 +08:00
&.green:hover {background:nth($cg, 2);}
&.green:active {background:nth($cg, 3);}
&.blue {border:0;background:nth($cb, 1);color:#fff;}
2017-07-11 17:40:45 +08:00
&.blue:hover {background:nth($cb, 2);}
&.blue:active {background:nth($cb, 3);}
&.purple {border:0;background:nth($cpp, 1);color:#fff;}
&.purple:hover {background:nth($cpp, 2);}
&.purple:active {background:nth($cpp, 3);}
&.red {border:0;background:nth($cr, 1);color:#fff;}
2017-07-11 17:40:45 +08:00
&.red:hover {background:nth($cr, 2);}
&.red:active {background:nth($cr, 3);}
&.orange {border:0;background:nth($co, 1);color:#fff;}
2017-07-11 17:40:45 +08:00
&.orange:hover {background:nth($co, 2);}
&.orange:active {background:nth($co, 3);}
&.plain {border:0;background:nth($cp, 1);color:nth($cgr, 1);}
2017-07-11 17:40:45 +08:00
&.plain:hover {background:nth($cp, 2);}
&.plain:active {background:nth($cp, 3);}
&.grey {border:0;background:nth($cgr, 1);color:#fff;}
2017-07-11 17:40:45 +08:00
&.grey:hover {background:nth($cgr, 2);}
&.grey:active {background:nth($cgr, 3);}
&.disabled {border-color:nth($cp, 1);color:nth($cp, 3);cursor:not-allowed;}
/* 额外样式 */
&.medium.with-style,
&.large.with-style {position:relative;padding-right:43px;
&::after {position:absolute;right:0;top:0;width:35px;;text-align:center;background:rgba(0,0,0,.2);font-family:"ui font" !important;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}
}
&.large.with-style {padding-right:58px;
&::after {width:50px;}
}
&.icon-del::after {content:"\e6f0"}
&.icon-add::after {content:"\e64c"}
&.icon-send::after {content:"\e64b"}
&.icon-confirm::after {content:"\e60f"}
&.icon-share::after {content:"\e631"}
&.icon-bad::after {content:"\e8ee"}
&.icon-good::after {content:"\e62d"}
&.icon-download::after {content:"\e611"}
&.icon-upload::after {content:"\e6f7"}
&.icon-mac::after {content:"\e60a"}
&.icon-ios::after {content:"\e609"}
&.icon-windows::after {content:"\e601"}
&.icon-linux::after {content:"\e602"}
&.icon-android::after {content:"\e600"}
2017-07-11 17:40:45 +08:00
}
/*--------各种input---------*/
.do-ui-input {position:relative;min-height:30px;padding:0 5px;border:1px solid nth($cp, 3);background:#fff;color:nth($cgr, 1);outline:none;@include ts;
2017-07-11 17:40:45 +08:00
&::-webkit-input-placeholder {color:nth($cp, 3);}
&.area {padding:5px;}
2017-07-11 17:40:45 +08:00
&.radius-3 {border-radius:3px;}
&.radius-5 {border-radius:5px;}
&:focus,&:hover {border-color:nth($ct, 1);}
&.alert {border-color:nth($cr, 1);color:nth($cr, 1);
input {color:nth($cr, 1);}
}
2017-07-11 17:40:45 +08:00
&.disabled {border-color:transparent;background:nth($cp, 1);color:nth($cp, 3)}
&.with-style {display:inline-block;padding:0;
input {width:100%;height:100%;min-height:30px;padding:0 30px 0 5px;border: 0;background:transparent;}
&::after {position:absolute;right:0;top:0;width:35px;height:30px;line-height:30px;text-align:center;font-family:"ui font" !important;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}
&.icon-user::after {content:"\e6f4"}
&.icon-pwd::after {content:"\e655"}
&.icon-mail::after {content:"\e66e"}
&.icon-date::after {content:"\e650"}
&.icon-phone::after {content:"\e651"}
}
2017-07-11 17:40:45 +08:00
}
/* select框 */
.do-ui-select {display:inline-block;min-height:30px;padding:0 30px 0 10px;border:0;border-bottom:1px solid #e7e7e7;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAMAAABV0m3JAAAADFBMVEUAAAD///+Pj4+JiYkxcGihAAAABHRSTlMAABBwqVQF9wAAADNJREFUeNqlzjEOACAMw8DQ/v/PSE5FFhaEx5usdekBuzRVH0RtCqJYELUFrVjQigX/5jdvzgDh9izlMQAAAABJRU5ErkJggg==) no-repeat right 8px;color:nth($cgr, 1);outline:none;-webkit-appearance:none;-moz-appearance: none;@include ts;
2017-07-11 17:40:45 +08:00
&::-ms-expand {display:none;}
&:focus {border-color:nth($ct, 1);}
2017-07-11 17:40:45 +08:00
&.alert {border-color:nth($cr, 1);color:nth($cr, 1)}
&.disabled {border-color:transparent;background:nth($cp, 1);color:nth($cp, 3)}
}
/* 单选和复选框 */
2017-07-11 17:40:45 +08:00
.do-ui-radio,
.do-ui-checkbox {display:inline-block;position:relative;width:auto;height:auto;min-height:30px;padding-left:35px;line-height:30px;border-radius:3px;color:nth($cgr, 1);
}
.do-ui-radio {padding-left:50px;
>input {position:absolute;left:10px;top:10px;width:35px;height:10px;border-radius:10px;border:0;background:nth($cp, 3);-webkit-appearance:none;-moz-appearance:none;
2017-07-11 17:40:45 +08:00
2017-09-05 20:52:10 +08:00
&:checked {background:nth($cp, 3);}
&:disabled {background:nth($cp, 2);}
&:disabled:checked {background:nth($cp, 3);}
&::after {position:absolute;display:block;left:-2px;top:-5px;width:20px;height:20px;border-radius:50%;content:"";background:nth($cp, 2);box-shadow:0 1px 2px rgba(0,0,0,.2);}
2017-09-05 20:52:10 +08:00
&:checked::after {left:auto;right:-2px;background:nth($cgr, 2);}
&:checked:disabled::after {background:nth($cp, 3);}
2017-07-11 17:40:45 +08:00
}
2017-09-05 20:52:10 +08:00
&.green >input:checked {background:nth($cg, 2);
&::after {background:nth($cg, 3);}
}
&.teal >input:checked {background:nth($cg, 2);
&::after {background:nth($ct, 3);}
}
2017-09-05 20:52:10 +08:00
&.blue >input:checked {background:nth($cb, 2);
&::after {background:nth($cb, 3);}
}
&.purple >input:checked {background:nth($cb, 2);
&::after {background:nth($cpp, 3);}
}
2017-09-05 20:52:10 +08:00
&.red >input:checked {background:nth($cr, 2);
&::after {background:nth($cr, 3);}
}
&.orange >input:checked {background:nth($co, 2);
&::after {background:nth($co, 3);}
}
&.grey >input:checked {background:nth($cgr, 2);
&::after {background:nth($cgr, 3);}
}
&.disabled {color:nth($cp, 3);}
2017-07-11 17:40:45 +08:00
}
.do-ui-checkbox {
2017-09-05 20:52:10 +08:00
>input {position:absolute;left:2px;top:2px;width:26px;height:26px;line-height:22px;border:2px solid nth($cp, 3);border-radius:3px;text-align:center;font-size:18px;font-family:"ui font" !important;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;-webkit-appearance:none;-moz-appearance:none;
&:checked::after {content:"\e60f";}
&:disabled {border-color:nth($cp, 3);color:nth($cp, 3);}
}
&.green >input {color:nth($cg, 1)!important;border-color:nth($cg, 1)}
&.teal >input {color:nth($ct, 1)!important;border-color:nth($ct, 1)}
&.purple >input {color:nth($cpp, 1)!important;border-color:nth($cpp, 1)}
&.blue >input {color:nth($cb, 1)!important;border-color:nth($cb, 1)}
&.red >input {color:nth($cr, 1)!important;border-color:nth($cr, 1)}
&.orange >input {color:nth($co, 1)!important;border-color:nth($co, 1)}
&.grey >input {color:nth($cgr, 1)!important;border-color:nth($cgr, 1)}
&.disabled {color:nth($cp, 3);}
2017-07-11 17:40:45 +08:00
}
.do-ui-checkbox {
&.with-style {padding-left:5px;padding-right:35px;line-height:26px;border:2px solid nth($cp, 1);background:nth($cp, 1);text-align:center;
>input {left:auto;right:0;top:0;line-height:26px;border:0;background:#fff;color:nth($cgr, 2);
&:disabled {color:nth($cp, 3)!important;}
}
2017-07-11 17:40:45 +08:00
&.green {border-color:nth($cg, 1);background:nth($cg, 1);color:#fff;}
&.teal {border-color:nth($ct, 1);background:nth($ct, 1);color:#fff;}
&.purple {border-color:nth($cpp, 1);background:nth($cpp, 1);color:#fff;}
&.blue {border-color:nth($cb, 1);background:nth($cb, 1);color:#fff;}
&.red {border-color:nth($cr, 1);background:nth($cr, 1);color:#fff;}
&.orange {border-color:nth($co, 1);background:nth($co, 1);color:#fff;}
&.grey {border-color:nth($cgr, 1);background:nth($cgr, 1);color:#fff;}
&.disabled {border-color:nth($cp, 1);background:nth($cp, 1);color:nth($cp, 3);}
2017-07-11 17:40:45 +08:00
}
}
2017-09-05 20:52:10 +08:00
/* 引用文本 */
2017-09-10 02:21:47 +08:00
.do-ui-quote {display:block;position:relative;min-height:60px;margin:10px 0;padding:15px 5px 5px 50px;border:1px solid #ddd;border-radius:10px;background:#f7f7f7;word-break: break-all;
2017-09-05 20:52:10 +08:00
&::before {position:absolute;left:8px;top:0;font:30px/1.5 "ui font";color:nth($cp, 3);content:"\e61b";}
}
/* 提醒文本 */
.do-ui-warn,.do-ui-mark {display:inline-block;position:relative;min-height:40px;margin:5px 0;padding:5px 8px 5px 50px;border:1px solid nth($co, 1);border-radius:5px;background:#fffbed;color:nth($co, 3);word-break: break-all;
p {margin:0!important;}
&::before {position:absolute;left:15px;top:5px;font:20px/1.5 "ui font";color:nth($cr, 1);content:"\e6f6";}
2017-09-05 20:52:10 +08:00
}
.do-ui-mark {border-color:nth($ct, 2);color:nth($ct, 3);background:#edfbf8;
2017-09-05 20:52:10 +08:00
&::before {color:nth($ct, 3);content:"\e657";}
2017-09-05 20:52:10 +08:00
}