init
This commit is contained in:
2
uni_modules/nutui-uni/styles/mixins/index.scss
Normal file
2
uni_modules/nutui-uni/styles/mixins/index.scss
Normal file
@@ -0,0 +1,2 @@
|
||||
@import 'make-animation';
|
||||
@import 'text-ellipsis';
|
||||
24
uni_modules/nutui-uni/styles/mixins/make-animation.scss
Normal file
24
uni_modules/nutui-uni/styles/mixins/make-animation.scss
Normal file
@@ -0,0 +1,24 @@
|
||||
@mixin make-animation(
|
||||
$keyframeName,
|
||||
$timingFun: $animation-timing-fun,
|
||||
$duration: $animation-duration
|
||||
) {
|
||||
.#{$keyframeName}-enter-active,
|
||||
.#{$keyframeName}In,
|
||||
.#{$keyframeName}-leave-active,
|
||||
.#{$keyframeName}Out {
|
||||
animation-duration: $duration;
|
||||
animation-fill-mode: both;
|
||||
animation-timing-function: $timingFun;
|
||||
}
|
||||
|
||||
.#{$keyframeName}-enter-active,
|
||||
.#{$keyframeName}In {
|
||||
animation-name: #{$keyframeName}In;
|
||||
}
|
||||
|
||||
.#{$keyframeName}-leave-active,
|
||||
.#{$keyframeName}Out {
|
||||
animation-name: #{$keyframeName}Out;
|
||||
}
|
||||
}
|
||||
22
uni_modules/nutui-uni/styles/mixins/text-ellipsis.scss
Normal file
22
uni_modules/nutui-uni/styles/mixins/text-ellipsis.scss
Normal file
@@ -0,0 +1,22 @@
|
||||
@mixin text-ellipsis() {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
// 单行超长省略号
|
||||
@mixin oneline-ellipsis($width: 100%) {
|
||||
width: $width;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
// 多行超长省略号
|
||||
@mixin moreline-ellipsis($line: 2, $width: 100%) {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: $line;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
}
|
||||
Reference in New Issue
Block a user