first commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
@import '../_variables.less';
|
||||
|
||||
.border(@position: bottom, @border-color: @component-border) {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: if(@position = top, 0, unset);
|
||||
bottom: if(@position = bottom, 0, unset);
|
||||
left: if(@position = left, 0, unset);
|
||||
right: if(@position = right, 0, unset);
|
||||
background-color: @border-color;
|
||||
}
|
||||
}
|
||||
|
||||
.border(@position: bottom, @border-color: @gray-color-1) when(@position = bottom) , (@position = top) {
|
||||
&::after {
|
||||
height: 1px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
}
|
||||
|
||||
.border(@position: bottom, @border-color: @gray-color-1) when(@position = left),(@position = right) {
|
||||
&::after {
|
||||
width: 1px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
transform: scaleX(0.5);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
.clearfix() {
|
||||
&::after {
|
||||
display: table;
|
||||
clear: both;
|
||||
content: '';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
.cursor-pointer() {
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
.ellipsis(@w:auto) {
|
||||
width: @w;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
.ellipsisLn(@line) {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-line-clamp: @line;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
@import '../_variables.less';
|
||||
|
||||
.hairline-base() {
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
content: ' ';
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.hairline(@color: @border-level-1-color) {
|
||||
.hairline-base();
|
||||
top: -50%;
|
||||
right: -50%;
|
||||
bottom: -50%;
|
||||
left: -50%;
|
||||
border: 1px solid @color;
|
||||
transform: scale(0.5);
|
||||
}
|
||||
|
||||
.hairline-top(@color: @border-level-1-color) {
|
||||
.hairline-base();
|
||||
right: 0;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border-top: 1px solid @color;
|
||||
transform: scaleY(0.5);
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
|
||||
.hairline-bottom(@color: @border-level-1-color, @width: 1px) {
|
||||
.hairline-base();
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
border-bottom: @width solid @color;
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
|
||||
.hairline-left(@color: @border-level-1-color) {
|
||||
.hairline-base();
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border-left: 1px solid @color;
|
||||
transform: scaleX(0.5);
|
||||
}
|
||||
|
||||
.hairline-right(@color: @border-level-1-color) {
|
||||
.hairline-base();
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
border-right: 1px solid @color;
|
||||
transform: scaleX(0.5);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
@import './_clearfix.less';
|
||||
@import './_hairline.less';
|
||||
@import './_ellipsis.less';
|
||||
@import './_cursor.less';
|
||||
@import './_border.less';
|
||||
@import './_other.less';
|
||||
@@ -0,0 +1,14 @@
|
||||
// 屏幕中不显示, 但可被读屏
|
||||
.sr-only() {
|
||||
&--sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
clip-path: inset(50%);
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user