Blame view

src/styles/components/anchor.less 1.74 KB
43513f70   zhigang.li   add anchor component
1
2
3
4
  @anchor-prefix: ~"@{css-prefix}anchor";
  
  .@{anchor-prefix}{
      &-wrapper{
43513f70   zhigang.li   add anchor component
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
          overflow: auto;
          padding-left: 4px;
          margin-left: -4px;
      }
  
      &{
          position: relative;
          padding-left: @anchor-border-width;
  
          &-ink {
              position: absolute;
              height: 100%;
              left: 0;
              top: 0;
              &:before {
                  content: ' ';
                  position: relative;
                  width: @anchor-border-width;
                  height: 100%;
                  display: block;
                  background-color: @border-color-split;
                  margin: 0 auto;
              }
              &-ball {
                  display: inline-block;
                  position: absolute;
                  width: 8px;
                  height: 8px;
599d4c90   梁灏   update Anchor
33
                  border-radius: 50%;
43513f70   zhigang.li   add anchor component
34
35
36
                  border: 2px solid @primary-color;
                  background-color: @body-background;
                  left: 50%;
599d4c90   梁灏   update Anchor
37
                  transition: top @transition-time @ease-in-out;
43513f70   zhigang.li   add anchor component
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
                  transform: translate(-50%, 2px);
              }
          }
  
          &.fixed &-ink &-ink-ball {
              display: none;
          }
      }
  
      &-link {
          padding: 8px 0 8px 16px;
          line-height: 1;
  
          &-title {
              display: block;
              position: relative;
              transition: all .3s;
              color: @text-color;
              white-space: nowrap;
              overflow: hidden;
              text-overflow: ellipsis;
              margin-bottom: 8px;
              &:only-child {
                  margin-bottom: 0;
              }
          }
  
          &-active > &-title {
              color: @primary-color;
          }
      }
  
      &-link &-link {
          padding-top: 6px;
          padding-bottom: 6px;
      }
  }