summaryrefslogtreecommitdiffstats
path: root/assets/sass/@primer/css/navigation/tabnav.scss
blob: fd90406168a96534af86cd2cb544564e2e66ebc0 (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
// Outer wrapper
// stylelint-disable selector-max-type
.tabnav {
  margin-top: 0;
  // stylelint-disable-next-line primer/spacing
  margin-bottom: 15px;
  border-bottom: $border-width $border-style $border-gray-dark;

  .Counter {
    // stylelint-disable-next-line primer/spacing
    margin-left: 5px;
  }
}

.tabnav-tabs {
  // stylelint-disable-next-line primer/spacing
  margin-bottom: -1px;
}

.tabnav-tab {
  display: inline-block;
  padding: $spacer-2 12px;
  font-size: $h5-size;
  // stylelint-disable-next-line primer/typography
  line-height: 20px;
  color: $text-gray;
  text-decoration: none;
  background-color: transparent;
  border: $border-width $border-style transparent;
  border-bottom: 0;

  &.selected,
  &[aria-selected=true],
  &[aria-current] {
    color: $text-gray-dark;
    background-color: $bg-white;
    border-color: $border-gray-dark;
    border-radius: $border-radius $border-radius 0 0;
  }

  &:hover,
  &:focus {
    color: $text-gray-dark;
    text-decoration: none;
  }
}

// Tabnav extras
//
// Tabnav extras are non-tab elements that sit in the tabnav. Usually they're
// inline text or links.

.tabnav-extra {
  display: inline-block;
  // stylelint-disable-next-line primer/spacing
  padding-top: 10px;
  // stylelint-disable-next-line primer/spacing
  margin-left: 10px;
  font-size: $font-size-small;
  color: $text-gray;

  > .octicon {
    // stylelint-disable-next-line primer/spacing
    margin-right: 2px;
  }
}

// When tabnav-extra are anchors
// stylelint-disable selector-no-qualifying-type
a.tabnav-extra:hover {
  color: $text-blue;
  text-decoration: none;
}
// stylelint-enable selector-no-qualifying-type

// Tabnav buttons
//
// For when there are multiple buttons, space them out appropriately. Requires
// the buttons to be floated or inline-block.

.tabnav-btn {
  // stylelint-disable-next-line primer/spacing
  margin-left: 10px;
}