张卓
2022-09-20 5aead44ba1be31db948dfd8362c2bfcbedbbce29
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// see https://ant.design/docs/spec/colors#Neutral-color-application
@border-color: @border-color-split;
@border-grids:
  sm @border-radius-sm,
  md @border-radius-md,
  lg @border-radius-lg;
 
.border { border: 1px solid @border-color !important; }
 
@border-width-list: 0, 1;
.for(@border-width-list, {
  .border-css-mixin(@i) when(@i > 0) {
    @css-value: ~"@{i}px solid @{border-color}";
  }
  .border-css-mixin(@i) when(default()) {
    @css-value: 0;
  }
  .border-css-mixin(@adIndex);
  .border-@{adIndex}        { border: @css-value !important; }
  .border-top-@{adIndex}    { border-top: @css-value !important; }
  .border-right-@{adIndex}  { border-right: @css-value !important; }
  .border-bottom-@{adIndex} { border-bottom: @css-value !important; }
  .border-left-@{adIndex}   { border-left: @css-value !important; }
});
 
// color
.for-each(@colors, {
  .border-@{adKey} {
    border-color: extract(@adItem, @color-basic-position) !important;
  }
});
 
.for-each(@aliasColors, {
  .border-@{adKey} {
    border-color: ~`getColor("@{colors}", "@{adValue}", @{color-basic-position})` !important;
  }
});
 
.border-white {
  border-color: #fff !important;
}
 
// Border-radius
.for-each(@border-grids, {
  .rounded-@{adKey}                 { border-radius: @adValue !important; }
  .rounded-top-left-@{adKey}        { border-top-left-radius: @adValue !important; }
  .rounded-top-right-@{adKey}       { border-top-right-radius: @adValue !important; }
  .rounded-bottom-left-@{adKey}     { border-bottom-left-radius: @adValue !important; }
  .rounded-bottom-right-@{adKey}    { border-bottom-right-radius: @adValue !important; }
});
 
.rounded-circle {
  border-radius: 50%;
}
 
.rounded-0 {
  border-radius: 0;
}