files.scss 2.9 KB
Newer Older
1 2 3 4
/**
 * File content holder
 *
 */
5
.file-holder {
D
Dmitriy Zaporozhets 已提交
6
  border: none;
7
  border: 1px solid $border-color;
8

D
Douwe Maan 已提交
9
  &.readme-holder {
10
    margin-top: 10px;
D
Douwe Maan 已提交
11 12 13
    border-bottom: 0;
  }

14 15 16 17
  table {
    @extend .table;
  }

18
  .file-title {
19 20 21
    position: relative;
    background: $background-color;
    border-bottom: 1px solid $border-color;
22 23
    margin: 0;
    text-align: left;
24
    padding: 10px $gl-padding;
25

26
    .file-actions {
27
      float: right;
28 29 30
      position: absolute;
      top: 5px;
      right: 15px;
31 32 33 34 35 36

      .btn {
        padding: 0px 10px;
        font-size: 13px;
        line-height: 28px;
      }
37 38
    }

39 40 41 42 43 44 45 46 47 48 49 50 51 52
    .filename {
      &.old {
        span.idiff {
          background-color: #f8cbcb;
        }
      }

      &.new {
        span.idiff {
          background-color: #a6f3a6;
        }
      }
    }

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

    &.image_file {
61
      background: #eee;
62
      text-align: center;
63
      img {
64
        padding: 100px;
65
        max-width: 50%;
66 67 68
      }
    }

D
Dmitriy Zaporozhets 已提交
69
    &.wiki {
70
      padding: $gl-padding;
71 72 73 74 75 76 77 78

      .highlight {
        margin-bottom: 9px;

        > pre {
          margin: 0;
        }
      }
D
Dmitriy Zaporozhets 已提交
79 80
    }

81 82 83 84
    &.blob_file {

    }

85 86 87 88 89 90
    &.blob-no-preview {
      background: #eee;
      text-shadow: 0 1px 2px #FFF;
      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 128 129
        border-left: 1px solid #DDD;
      }
      td.lines {
130
        padding: 0;
131 132 133
        code {
          font-family: $monospace_font;
        }
134 135 136
        pre {
          margin: 0;
        }
137
      }
138 139 140
    }

    &.logs {
141
      background: #eee;
142 143 144 145
      max-height: 700px;
      overflow-y: auto;

      ol {
146
        margin-left: 40px;
147
        padding: 10px 0;
148
        border-left: 1px solid $border-color;
149
        margin-bottom: 0;
150 151
        background: white;
        li {
152
          color: #888;
153
          p {
154
            margin: 0;
155
            color: #333;
156
            line-height: 24px;
157 158 159 160
            padding-left: 10px;
          }

          &:hover {
161
            background: $hover;
162 163 164 165 166 167 168 169 170
          }
        }
      }
    }

    /**
     *  Code file
     */
    &.code {
R
Riyad Preukschas 已提交
171
      padding: 0;
172 173 174
    }
  }
}
175 176 177 178 179 180 181 182 183 184 185 186

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

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