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

P
Phil Hughes 已提交
8 9 10 11
  &.file-holder-no-border {
    border: 0;
  }

D
Douwe Maan 已提交
12
  &.readme-holder {
13
    margin: $gl-padding-top 0;
D
Douwe Maan 已提交
14 15
  }

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

20
  .file-title {
21
    position: relative;
A
Annabel Dunstone 已提交
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;
A
Annabel Dunstone 已提交
28
    border-radius: 3px 3px 0 0;
29

P
Phil Hughes 已提交
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
    }

A
Annabel Dunstone 已提交
52
    a:not(.btn) {
53
      color: $gl-text-color;
54 55
    }

S
skv-headless 已提交
56 57 58
    .left-options {
      margin-top: -3px;
    }
59
  }
60
  .file-content {
61
    background: #fff;
62 63

    &.image_file {
64
      background: #eee;
65
      text-align: center;
66
      
67
      img {
68 69
        padding: 20px;
        max-width: 100%;
70 71 72
      }
    }

D
Dmitriy Zaporozhets 已提交
73
    &.wiki {
74
      padding: 30px $gl-padding;
75 76 77 78 79 80 81 82

      .highlight {
        margin-bottom: 9px;

        > pre {
          margin: 0;
        }
      }
D
Dmitriy Zaporozhets 已提交
83 84
    }

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

91 92 93 94
    /**
     *  Blame file
     */
    &.blame {
95
      table {
96 97 98
        border: none;
        box-shadow: none;
        margin: 0;
99
      }
100 101 102 103
      tr {
        border-bottom: 1px solid #eee;
      }
      td {
104
        &:first-child {
105
          border-left: none;
106 107
        }
        &:last-child {
108
          border-right: none;
109
        }
110
      }
111 112 113 114 115 116 117 118 119 120 121 122 123 124
      img.avatar {
        border: 0 none;
        float: none;
        margin: 0;
        padding: 0;
      }
      td.blame-commit {
        background: #f9f9f9;
        min-width: 350px;

        .commit-author-link {
          color: #888;
        }
      }
125 126
      td.line-numbers {
        float: none;
127
        border-left: 1px solid #ddd;
A
Annabel Dunstone 已提交
128 129 130 131 132

        i {
          float: none;
          margin-right: 0;
        }
133 134
      }
      td.lines {
135
        padding: 0;
136 137 138
        code {
          font-family: $monospace_font;
        }
139 140 141
        pre {
          margin: 0;
        }
142
      }
143 144 145
    }

    &.logs {
146
      background: #eee;
147 148 149 150
      max-height: 700px;
      overflow-y: auto;

      ol {
151
        margin-left: 40px;
152
        padding: 10px 0;
153
        border-left: 1px solid $border-color;
154
        margin-bottom: 0;
155 156
        background: white;
        li {
157
          color: #888;
158
          p {
159
            margin: 0;
160
            color: #333;
161
            line-height: 24px;
162 163 164 165
            padding-left: 10px;
          }

          &:hover {
P
Phil Hughes 已提交
166
            background: $row-hover;
167 168 169 170 171 172 173 174 175
          }
        }
      }
    }

    /**
     *  Code file
     */
    &.code {
R
Riyad Preukschas 已提交
176
      padding: 0;
177
      -webkit-overflow-scrolling: auto; // See https://gitlab.com/gitlab-org/gitlab-ce/issues/13987
178 179 180
    }
  }
}
181 182 183 184 185 186 187 188 189 190 191 192

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

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