files.scss 2.86 KB
Newer Older
1 2 3 4
/**
 * File content holder
 *
 */
5
.file-holder {
6
  border: 1px solid $border-color;
7

Phil Hughes's avatar
Phil Hughes committed
8 9 10 11
  &.file-holder-no-border {
    border: 0;
  }

12
  &.readme-holder {
13
    margin: $gl-padding-top 0;
14 15
  }

16 17 18 19
  table {
    @extend .table;
  }

20
  .file-title {
21
    position: relative;
Annabel Dunstone's avatar
Annabel Dunstone committed
22
    background-color: $background-color;
23
    border-bottom: 1px solid $border-color;
24 25
    margin: 0;
    text-align: left;
26
    padding: 10px $gl-padding;
27
    word-wrap: break-word;
Annabel Dunstone's avatar
Annabel Dunstone committed
28
    border-radius: 3px 3px 0 0;
29

Phil Hughes's avatar
Phil Hughes committed
30 31 32 33 34 35 36 37 38 39
    &.file-title-clear {
      padding-left: 0;
      padding-right: 0;
      background-color: transparent;

      .file-actions {
        right: 0;
      }
    }

40
    .file-actions {
41 42 43
      position: absolute;
      top: 5px;
      right: 15px;
44 45

      .btn {
46
        padding: 0 10px;
47 48 49
        font-size: 13px;
        line-height: 28px;
      }
50 51
    }

Annabel Dunstone's avatar
Annabel Dunstone committed
52
    a:not(.btn) {
53
      color: $gl-text-color;
54 55
    }

skv-headless's avatar
skv-headless committed
56 57 58
    .left-options {
      margin-top: -3px;
    }
59
  }
60

61
  .file-content {
62
    background: #fff;
63 64

    &.image_file {
65
      background: #eee;
66
      text-align: center;
67

68
      img {
69
        padding: 20px;
70
        max-width: 80%;
71 72 73
      }
    }

74
    &.wiki {
75
      padding: 30px $gl-padding;
76 77 78 79 80 81 82 83

      .highlight {
        margin-bottom: 9px;

        > pre {
          margin: 0;
        }
      }
84 85
    }

86 87
    &.blob-no-preview {
      background: #eee;
88
      text-shadow: 0 1px 2px #fff;
89 90 91
      padding: 100px 0;
    }

92 93 94 95
    /**
     *  Blame file
     */
    &.blame {
96
      table {
97 98
        border: none;
        margin: 0;
99
      }
100

101 102 103
      tr {
        border-bottom: 1px solid #eee;
      }
104

105
      td {
106
        &:first-child {
107
          border-left: none;
108
        }
109

110
        &:last-child {
111
          border-right: none;
112
        }
113
      }
114

115
      td.blame-commit {
116 117
        padding: 0 10px;
        min-width: 400px;
118
        background: $gray-light;
119
      }
120

121 122
      td.line-numbers {
        float: none;
123
        border-left: 1px solid #ddd;
Annabel Dunstone's avatar
Annabel Dunstone committed
124 125 126 127 128

        i {
          float: none;
          margin-right: 0;
        }
129
      }
130

131
      td.lines {
132
        padding: 0;
133
      }
134 135 136
    }

    &.logs {
137
      background: #eee;
138 139 140 141
      max-height: 700px;
      overflow-y: auto;

      ol {
142
        margin-left: 40px;
143
        padding: 10px 0;
144
        border-left: 1px solid $border-color;
145
        margin-bottom: 0;
146
        background: white;
147

148
        li {
149
          color: #888;
150

151
          p {
152
            margin: 0;
153
            color: #333;
154
            line-height: 24px;
155 156 157 158
            padding-left: 10px;
          }

          &:hover {
159
            background: $row-hover;
160 161 162 163 164 165 166 167 168
          }
        }
      }
    }

    /**
     *  Code file
     */
    &.code {
169
      padding: 0;
170
      -webkit-overflow-scrolling: auto; // See https://gitlab.com/gitlab-org/gitlab-ce/issues/13987
171 172 173
    }
  }
}
174 175 176 177 178 179 180 181 182 183 184 185

span.idiff {
  &.left {
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
  }

  &.right {
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
  }
}