Summary Files Commits Branches @commit @diff @stats
path: root / src / navigation.less
blob: 00bf86d761079b9e63cbcebd48f89064e581c858 (plain) (blame)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// Navigation
.breadcrumb,
.tab,
.pagination {
  list-style: none;
  margin: .5rem 0;
}
// Breadcrumbs
.breadcrumb {
  padding: 1.2rem;

  .breadcrumb-item {
    display: inline-block;
    margin: 0;

    a {
      text-decoration: none;
    }
    &:last-child {
      &,
      a {
        color: lighten(@body-font-color, 20%);
        pointer-events: none;
      }
    }
    &:not(:last-child) {
      &::after {
        color: @control-color;
        content: "/";
        padding: 0 .4rem;
      }
    }
  }
}

// Tabs
.tab {
  display: flex;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;

  .tab-item {
    border-bottom: .1rem solid @control-color;
    margin-top: 0;

    a {
      border-bottom: .2rem solid transparent;
      color: @body-font-color;
      display: block;
      margin-bottom: -.1rem;
      margin-top: 0;
      padding: .8rem 1.4rem;
      text-decoration: none;
      &:focus,
      &:hover {
        color: @core-link-color;
      }
    }
    &.active a,
    a.active {
      border-bottom-color: darken(@core-color, 10%);
      color: darken(@core-link-color, 10%);
    }

    .badge {
      &[data-badge]::after {
        position: absolute;
        right: -1.4rem;
        top: 1rem;
        transform: translate(-50%, -1rem);
      }
    }
  }

  &.tab-block {
    .tab-item {
      flex: 1 0 auto;
      text-align: center;
    }
  }
}

// Pagination
.pagination {
  display: inline-block;
  padding: 1.2rem;

  .page-item {
    display: inline-block;

    span {
      display: inline-block;
      padding: .6rem .5rem;
    }

    a {
      border-radius: .3rem;
      display: inline-block;
      margin: 0 .1rem;
      padding: .6rem .8rem;
      text-decoration: none;
      &:focus,
      &:hover {
        background: @core-secondary-color;
      }
    }

    &.active {
      a {
        background: @core-color;
        color: @core-light-color;
      }
    }
  }
}