diff --git a/package.json b/package.json index 4599d4f..ebc766e 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "unzip": "~0.1.9" }, "scripts": { - "test": "stylelint src/scss/*.scss" + "test": "stylelint src/scss/*.scss src/scss/**/*.scss" }, "keywords": [ "css", diff --git a/src/scss/com/_button.scss b/src/scss/com/_button.scss index 270e0f3..62a419c 100644 --- a/src/scss/com/_button.scss +++ b/src/scss/com/_button.scss @@ -19,13 +19,13 @@ border-bottom-color: #bbb !important; background-color: #f4f4f4; background-repeat: repeat-x; - background-image: linear-gradient(to bottom, #f8f8f8, #eeeeee); + background-image: linear-gradient(to bottom, #f8f8f8, #eee); } .btn, .btn:hover, .btn:visited { - color: #333!important; + color: #333 !important; } .btn:hover { @@ -41,21 +41,19 @@ background-image: linear-gradient(to bottom, #e6e6e6, #f2f2f2); } - /* 错误 */ - .btn-error { border-color: transparent; border-bottom-color: #c21b1b !important; background-color: #ff3636; background-repeat: repeat-x; - background-image: linear-gradient(to bottom, #ff4444, #ff2222); + background-image: linear-gradient(to bottom, #f44, #f22); } .btn-error, .btn-error:hover, .btn-error:visited { - color: #FFF!important; + color: #fff !important; } .btn-error:hover { @@ -70,38 +68,34 @@ background-image: linear-gradient(to bottom, #d51314, #ee2020); } - /* 警告 */ - .btn-warning { border-color: transparent; border-bottom-color: #cf370c !important; background-color: #ff4e00; background-repeat: repeat-x; - background-image: linear-gradient(to bottom, #ff5500, #ff4400); + background-image: linear-gradient(to bottom, #f50, #f40); } .btn-warning, .btn-warning:hover, .btn-warning:visited { - color: #FFF!important; + color: #fff !important; } .btn-warning:hover { background-color: #ef4000; background-repeat: repeat-x; - background-image: linear-gradient(to bottom, #ff4400, #d73900); + background-image: linear-gradient(to bottom, #f40, #d73900); } .btn-warning:active { background-color: #e73d00; background-repeat: repeat-x; - background-image: linear-gradient(to bottom, #d73900, #ff4400); + background-image: linear-gradient(to bottom, #d73900, #f40); } - /* 主要 */ - .btn-primary { border-color: transparent; border-bottom-color: #0960ab !important; @@ -113,7 +107,7 @@ .btn-primary, .btn-primary:hover, .btn-primary:visited { - color: #FFF!important; + color: #fff !important; } .btn-primary:hover { @@ -143,23 +137,25 @@ background-image: linear-gradient(to bottom, #f2f2f2, #e6e6e6); } - /* ========================================================================== 按钮组合 ========================================================================== */ .btn-group { overflow: hidden; + .btn { float: left; margin: 0; border-radius: 0; border-left-width: 0; } + .btn-group .btn:first-child { border-left-width: 1px; border-radius: 2px 0 0 2px; } + .btn:last-child { border-radius: 0 2px 2px 0; } @@ -176,7 +172,6 @@ font-size: 18px; } - .btn-large { padding: 0 20px; height: 38px; diff --git a/src/scss/com/_layout.scss b/src/scss/com/_layout.scss index 8cfd59d..4fb816e 100644 --- a/src/scss/com/_layout.scss +++ b/src/scss/com/_layout.scss @@ -24,9 +24,9 @@ *word-spacing: -1px; /* IE6/7 */ } -@media (-webkit-min-device-pixel-ratio:0) { -.dib-box { - letter-spacing: -5px; /* Safari 5- 等不支持 font-size: 0 的浏览器*/ +@media (-webkit-min-device-pixel-ratio: 0) { + .dib-box { + letter-spacing: -5px; /* Safari 5- 等不支持 font-size: 0 的浏览器 */ } } @@ -98,8 +98,8 @@ height: 0; line-height: 0; display: inline-block; - *display:inline; - *zoom:1; + *display: inline; + *zoom: 1; vertical-align: -2px; border: 0 dashed transparent; border-width: 6px; @@ -107,49 +107,49 @@ .arrow-top { border-bottom-style: solid; - border-bottom-color: #2AB2DF; + border-bottom-color: #2ab2df; } .arrow-bottom { border-top-style: solid; - border-top-color: #2AB2DF; + border-top-color: #2ab2df; } .arrow-left { border-right-style: solid; - border-right-color: #2AB2DF; + border-right-color: #2ab2df; } .arrow-right { border-left-style: solid; - border-left-color: #2AB2DF; + border-left-color: #2ab2df; } /* ◤左上角 */ .arrow-left-top { border-top-style: solid; - border-top-color: #2AB2DF; + border-top-color: #2ab2df; border-left-width: 0 !important; } /* ◥右上角 */ .arrow-right-top { border-top-style: solid; - border-top-color: #2AB2DF; + border-top-color: #2ab2df; border-right-width: 0 !important; } /* ◣左下角 */ .arrow-left-bottom { border-bottom-style: solid; - border-bottom-color: #2AB2DF; + border-bottom-color: #2ab2df; border-left-width: 0 !important; } /* ◢右下角 */ .arrow-right-bottom { border-bottom-style: solid; - border-bottom-color: #2AB2DF; + border-bottom-color: #2ab2df; border-right-width: 0 !important; } @@ -174,7 +174,7 @@ width: 100%; height: 100%; left: 0; - top: 0 + top: 0; } /* 常见的视频比例 */ @@ -222,8 +222,8 @@ } /* 修复 Safari 5- inline-block 的空隙 */ -@media (-webkit-min-device-pixel-ratio:0) { -.center-box { +@media (-webkit-min-device-pixel-ratio: 0) { + .center-box { letter-spacing: -5px; } } @@ -263,7 +263,7 @@ vertical-align: middle; padding: 0 !important; /* 防止设置边距导致居中失效 */ margin: 0 !important; - font-size:0; + font-size: 0; } .center-box img { diff --git a/src/scss/com/_print.scss b/src/scss/com/_print.scss index 8b9c403..c2e4e38 100644 --- a/src/scss/com/_print.scss +++ b/src/scss/com/_print.scss @@ -26,11 +26,11 @@ } a[href]:after { - content: "("attr(href)")"; + content: "("attr(href) ")"; } abbr[title]:after { - content: "("attr(title)")"; + content: "("attr(title) ")"; } /** @@ -62,7 +62,7 @@ } @page { - margin: 0.5cm; + margin: .5cm; } p, diff --git a/src/scss/com/_utils.scss b/src/scss/com/_utils.scss index 5a3bc96..61a3413 100644 --- a/src/scss/com/_utils.scss +++ b/src/scss/com/_utils.scss @@ -35,7 +35,9 @@ .clearall { overflow: hidden; + /* stylelint-disable */ _overflow: visible; + /* stylelint-enable */ *zoom: 1; } @@ -85,7 +87,6 @@ text-align: left; /* 2 */ } - /* -------------------------------------------------------------------------- 图片替换 -------------------------------------------------------------------------- */ @@ -106,10 +107,10 @@ * 2. VoiceOver 无法读出宽高为 0 的元素 */ .clip-hide { - position: absolute !important; /*clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ + position: absolute !important; /* clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ clip: rect(1px, 1px, 1px, 1px); /* 1 */ padding: 0 !important; - border: 0 none!important; + border: 0 none !important; height: 1px !important; /* 2 */ width: 1px !important; overflow: hidden; @@ -150,7 +151,7 @@ -webkit-appearance: none; /* 1 */ -moz-appearance: none; /* 2 */ appearance: none; - text-overflow:""; /* 3 */ + text-overflow: ""; /* 3 */ text-indent: .01px; /* 3 */ } diff --git a/src/scss/type.scss b/src/scss/type.scss index 2a4501c..f466cba 100644 --- a/src/scss/type.scss +++ b/src/scss/type.scss @@ -67,7 +67,9 @@ textarea { .type h5 a, .type h6 a { border-bottom: 1px solid transparent; + /* stylelint-disable */ _border-bottom: 1px none; + /* stylelint-enable */ } .type li a:hover,