files.scss 4.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 Gray 已提交
22
    background-color: $gray-light;
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

61
  .file-content {
S
Sam Rose 已提交
62
    background: $white-light;
63 64

    &.image_file {
S
Sam Rose 已提交
65
      background: $file-image-bg;
66
      text-align: center;
P
Phil Hughes 已提交
67

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

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

      .highlight {
        margin-bottom: 9px;

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

86
    &.blob-no-preview {
S
Sam Rose 已提交
87 88
      background: $blob-bg;
      text-shadow: 0 1px 2px $white-light;
89 90 91
      padding: 100px 0;
    }

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

101
      tr {
S
Sam Rose 已提交
102
        border-bottom: 1px solid $blame-border;
103
      }
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 {
P
Phil Hughes 已提交
116 117
        padding: 0 10px;
        min-width: 400px;
118
        background: $gray-light;
119
      }
120

121 122
      td.line-numbers {
        float: none;
S
Sam Rose 已提交
123
        border-left: 1px solid $blame-line-numbers-border;
A
Annabel Dunstone 已提交
124 125 126 127 128

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

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

    &.logs {
S
Sam Rose 已提交
137
      background: $logs-bg;
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;
S
Sam Rose 已提交
146
        background: $white-light;
147

148
        li {
S
Sam Rose 已提交
149
          color: $logs-li-color;
150

151
          p {
152
            margin: 0;
S
Sam Rose 已提交
153
            color: $logs-p-color;
154
            line-height: 24px;
155 156 157 158
            padding-left: 10px;
          }

          &:hover {
P
Phil Hughes 已提交
159
            background: $row-hover;
160 161 162 163 164 165 166 167 168
          }
        }
      }
    }

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

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

  &.right {
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
  }
}
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233

.file-stats {
  ul {
    list-style: none;
    margin: 0;
    padding: 10px 0;

    li {
      padding: 3px 0;
      line-height: 20px;
    }
  }

  .new-file {
    a {
      color: $gl-text-green;
    }
  }

  .renamed-file {
    a {
      color: $gl-text-orange;
    }
  }

  .deleted-file {
    a {
      color: $gl-text-red;
    }
  }

  .edit-file {
    a {
      color: $gl-text-color;
    }
  }

  a {
    text-decoration: none;

    .new-file {
      color: $notify-new-file;
    }

    .deleted-file {
      color: $notify-deleted-file;
    }
  }
}
234 235 236 237 238


.file-title-flex-parent {
  display: flex;
  align-items: center;
239
  justify-content:space-between;
240 241 242 243 244 245
  background-color: $gray-light;
  border-bottom: 1px solid $border-color;
  padding: 10px $gl-padding;
  margin: 0;
  border-radius: 3px 3px 0 0;

246
  .file-header-content {
247 248 249
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
250 251 252 253 254 255 256 257 258 259
    padding-right: 30px;
    position: relative;
  }

  .btn-clipboard {
    position: absolute;
    right: 0;
  }

  a {
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
    color: $gl-text-color;
  }

  small {
    margin: 0 10px 0 0;
  }

  .file-actions {
    white-space: nowrap;

    .btn {
      padding: 0 10px;
      font-size: 13px;
      line-height: 28px;
      display: inline-block;
    }
  }
}