[Improvement] upgrade to precss 3.0 (#1696)

This commit is contained in:
neverland
2018-08-27 15:41:45 +08:00
committed by GitHub
parent 26ff8ef43a
commit ab00a16b6a
16 changed files with 655 additions and 528 deletions
@@ -1,34 +0,0 @@
@import '../common/var.css';
$border-poses: top, right, bottom, left;
@define-mixin border-retina $poses: $border-poses, $border-retina-color: $border-color {
content: '';
position: absolute;
top: 0;
left: 0;
width: 200%;
height: 200%;
transform: scale(.5);
transform-origin: 0 0;
pointer-events: none;
box-sizing: border-box;
@each $pos in $poses {
border-$(pos): 1px solid $border-retina-color;
}
}
@define-mixin hairline $border-retina-color: $border-color {
content: '';
position: absolute;
top: 0;
left: 0;
width: 200%;
height: 200%;
transform: scale(.5);
transform-origin: 0 0;
pointer-events: none;
box-sizing: border-box;
border: 0 solid $border-retina-color;
}
+1 -1
View File
@@ -1,4 +1,4 @@
@define-mixin clearfix {
@mixin clearfix {
&::after {
content: '';
display: table;
+7 -7
View File
@@ -1,13 +1,13 @@
@define-mixin multi-ellipsis $lines {
overflow : hidden;
@mixin multi-ellipsis($lines) {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: $lines;
-webkit-box-orient: vertical;
}
@define-mixin ellipsis {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
@mixin ellipsis {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
+13
View File
@@ -0,0 +1,13 @@
@mixin hairline($border-color: #e5e5e5) {
content: '';
position: absolute;
top: 0;
left: 0;
width: 200%;
height: 200%;
transform: scale(0.5);
transform-origin: 0 0;
pointer-events: none;
box-sizing: border-box;
border: 0 solid $border-color;
}