vben
2021-01-01 0419a070413be34ea5455ed955fa51d8c522da86
提交 | 用户 | age
2f6253 1 .setPlaceholder(@prefix,@color:@text-color-help-dark) {
2   // input
3   @{prefix}::-webkit-input-placeholder {
4     color: @color;
5   }
6   @{prefix}::-moz-placeholder {
7     /* Mozilla Firefox 19+ */
8     color: @color;
9   }
10   @{prefix}:-moz-placeholder {
11     /* Mozilla Firefox 4 to 18 */
12     color: @color;
13   }
14   @{prefix}:-ms-input-placeholder {
15     /* Internet Explorer 10-11 */
16     color: @color;
17   }
18 }
e5f8ce 19 // Text truncation
2f6253 20 .text-truncate() {
21   overflow: hidden;
22   text-overflow: ellipsis;
23   white-space: nowrap;
24 }
25
e5f8ce 26 /* Force no line break */
2f6253 27 .word-nowrap() {
28   word-wrap: normal;
29   white-space: nowrap;
30 }
31
e5f8ce 32 /* Force line break */
2f6253 33 .break-all() {
34   word-break: break-all;
35   word-wrap: break-word;
36   white-space: normal;
37 }
38
e5f8ce 39 // Prohibit selection
2f6253 40 .unselect() {
41   cursor: pointer;
42   user-select: none;
43 }
44
e5f8ce 45 /* Suitable for webkit core and mobile */
2f6253 46 .ellipsis-multiple(@num: 1) {
47   display: -webkit-box;
48   overflow: hidden;
49   -webkit-box-orient: vertical;
50   -webkit-line-clamp: @num;
51 }
03b602 52
N 53 .respond-to (small, @content) {
54   @media only screen and (min-width: @screen-sm-min) {
55     @content();
56   }
57 }
58 .respond-to (medium, @content) {
59   @media only screen and (min-width: @screen-md-min) {
60     @content();
61   }
62 }
63 .respond-to (large, @content) {
64   @media only screen and (min-width: @screen-lg-min) {
65     @content();
66   }
67 }
68 .respond-to (xlarge, @content) {
69   @media only screen and (min-width: @screen-xl-min) {
70     @content();
71   }
72 }
73 .respond-to (xsmall-only, @content) {
74   @media only screen and (max-width: @screen-xs-max) {
75     @content();
76   }
77 }
78 .respond-to (small-only, @content) {
79   @media only screen and (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
80     @content();
81   }
82 }
83 .respond-to (medium-only, @content) {
84   @media only screen and (min-width: @screen-md-min) and (max-width: @screen-md-max) {
85     @content();
86   }
87 }
88 .respond-to (large-only, @content) {
89   @media only screen and (min-width: @screen-lg-min) and (max-width: @screen-lg-max) {
90     @content();
91   }
92 }
4ce1d5 93
03b602 94 .respond-to (xsmall-and-small, @content) {
N 95   @media only screen and (max-width: @screen-sm-max) {
96     @content();
97   }
98 }
99 .respond-to (small-and-medium, @content) {
100   @media only screen and (min-width: @screen-sm-min) and (max-width: @screen-md-max) {
101     @content();
102   }
103 }