sidebar.scss 2.5 KB
Newer Older
1 2
.content-wrapper {
  width: 100%;
3
  transition: padding $sidebar-transition-duration;
4 5

  .container-fluid {
S
Sam Rose 已提交
6
    background: $white-light;
7
    padding: 0 $gl-padding;
8 9 10 11 12 13

    &.container-blank {
      background: none;
      padding: 0;
      border: none;
    }
14
  }
15 16
}

P
Phil Hughes 已提交
17
.nav-header-btn {
18
  padding: 10px $gl-sidebar-padding;
P
Phil Hughes 已提交
19
  color: inherit;
P
Phil Hughes 已提交
20
  transition-duration: .3s;
21 22
  position: absolute;
  top: 0;
F
Fatih Acet 已提交
23
  cursor: pointer;
24

P
Phil Hughes 已提交
25 26 27
  &:hover,
  &:focus {
    color: $white-light;
28 29
    text-decoration: none;
  }
30
}
31

P
Phil Hughes 已提交
32
.right-sidebar-collapsed {
33
  padding-right: 0;
P
Phil Hughes 已提交
34

J
Jacob Schatz 已提交
35
  @media (min-width: $screen-sm-min) {
36
    &:not(.wiki-sidebar):not(.build-sidebar):not(.issuable-bulk-update-sidebar) .content-wrapper {
37 38 39
      padding-right: $gutter_collapsed_width;
    }

40
    .merge-request-tabs-holder.affix {
41
      right: $gutter_collapsed_width;
42
    }
J
Jacob Schatz 已提交
43
  }
J
Jacob Schatz 已提交
44 45 46

  .sidebar-collapsed-icon {
    cursor: pointer;
47 48 49 50

    .btn {
      background-color: $gray-light;
    }
J
Jacob Schatz 已提交
51
  }
52 53
}

P
Phil Hughes 已提交
54 55
.right-sidebar-expanded {
  padding-right: 0;
L
Luke "Jared" Bennett 已提交
56
  z-index: 300;
P
Phil Hughes 已提交
57

58
  @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
59
    &:not(.wiki-sidebar):not(.build-sidebar):not(.issuable-bulk-update-sidebar) .content-wrapper {
60 61 62 63
      padding-right: $gutter_collapsed_width;
    }
  }

P
Phil Hughes 已提交
64
  @media (min-width: $screen-md-min) {
A
Annabel Dunstone Gray 已提交
65 66 67
    .content-wrapper {
      padding-right: $gutter_width;
    }
68

69
    &:not(.with-overlay) .merge-request-tabs-holder.affix {
70 71
      right: $gutter_width;
    }
72 73

    &.with-overlay .merge-request-tabs-holder.affix {
74
      right: $gutter_collapsed_width;
75
    }
P
Phil Hughes 已提交
76
  }
77
}
78 79 80

.right-sidebar {
  border-left: 1px solid $border-color;
81 82 83

  &.affix {
    position: fixed;
84
    top: $header-height;
85
  }
86 87 88 89

  &:not(.affix-top) {
    min-height: 100%;
  }
90
}
91 92 93 94 95 96 97 98

@mixin maintain-sidebar-dimensions {
  display: block;
  width: $gutter-width;
}

.issues-bulk-update.right-sidebar {
  @include maintain-sidebar-dimensions;
B
Bryce Johnson 已提交
99 100 101
  width: 0;
  padding: 0;
  transition: width $sidebar-transition-duration;
102 103 104

  &.right-sidebar-expanded {
    @include maintain-sidebar-dimensions;
B
Bryce Johnson 已提交
105
    width: $gutter-width;
B
Bryce Johnson 已提交
106 107 108 109 110 111 112 113 114

    .issuable-sidebar-header {
      // matches `.top-area .nav-controls` for issuable index pages
      padding: 11px 0;
    }

    .block:last-of-type {
      border: none;
    }
115 116 117 118
  }

  &.right-sidebar-collapsed {
    @include maintain-sidebar-dimensions;
B
Bryce Johnson 已提交
119 120
    width: 0;
    padding: 0;
121 122 123 124 125 126 127 128 129 130

    .block {
      padding: 16px 0;
      width: 250px;
      border-bottom: 1px solid $border-color;
    }
  }

  .issuable-sidebar {
    padding: 0 3px;
B
Bryce Johnson 已提交
131
    width: calc(100% + 35px);
132 133
  }
}